From 5758fa860ecd58188a1eadba43e707a47e3d3f13 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 31 Jul 2014 09:58:01 +0100 Subject: Handle theme names that include a hyphen Ruby doesn't allow method names with hyphens, which it interprets as a minus sign. Fixes #20. --- lib/alavetelitheme.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/alavetelitheme.rb') 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 -- cgit v1.2.3