diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-07-31 09:58:01 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-08-05 11:29:25 +0100 |
commit | 5758fa860ecd58188a1eadba43e707a47e3d3f13 (patch) | |
tree | 7b9d4d19dbdbeff407f0c60888c39942a7cadd73 /lib | |
parent | c1c958f27d1d6ff155cad6707a27bcea98f389be (diff) |
Handle theme names that include a hyphen
Ruby doesn't allow method names with hyphens, which it interprets as a
minus sign. Fixes #20.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/alavetelitheme.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb index 8476e90..c8611d5 100644 --- a/lib/alavetelitheme.rb +++ b/lib/alavetelitheme.rb @@ -1,4 +1,6 @@ -THEME_NAME = File.split(File.expand_path("../..", __FILE__))[1] +theme_name = File.split(File.expand_path("../..", __FILE__))[1] +theme_name.gsub!('-', '_') +THEME_NAME = theme_name class ActionController::Base # The following prepends the path of the current theme's views to |