lib/stache/handlebars/handler.rb in stache-1.0.0.rc vs lib/stache/handlebars/handler.rb in stache-1.0.0
- old
+ new
@@ -68,9 +68,11 @@
end
# suss out a constant name for the given template
def handlebars_class_from_template(template)
const_name = ActiveSupport::Inflector.camelize(template.virtual_path.to_s)
+ const_name = "#{Stache.wrapper_module_name}::#{const_name}" if Stache.wrapper_module_name
+
begin
const_name.constantize
rescue NameError, LoadError => e
# Only rescue NameError/LoadError concerning our mustache_class
if e.message.match(/#{const_name}$/)
\ No newline at end of file