public
Description: A library for safe evaluation of Ruby code based on ParseTree/RubyParser and Ruby2Ruby. Provides Rails ActionView template handlers for ERB and Haml.
Homepage: http://www.artweb-design.de
Clone URL: git://github.com/svenfuchs/safemode.git
registered template handlers just aren't always a Hash
svenfuchs (author)
Sat May 03 12:27:15 -0700 2008
commit  65c892659674bab0a90303df7414ae8a0b7dae8b
tree    d954f9e3fc84f0b03b0e6314974547062f22d71e
parent  2f04824faa00e3fb1b662cffc9d2a6f8e42788cc
...
21
22
23
24
 
 
 
 
 
25
26
27
...
21
22
23
 
24
25
26
27
28
29
30
31
0
@@ -21,7 +21,11 @@ module ActionView
0
 
0
     def self.handler_class_for_template(template)
0
       if template.extension && handler = @@template_handlers[template.extension.to_sym]
0
- return handler[:class] if eval_handler_conditions(template, handler)
0
+ if handler.is_a? Hash
0
+ return handler[:class] if eval_handler_conditions(template, handler)
0
+ else
0
+ return handler
0
+ end
0
       end
0
       @@default_template_handlers
0
     end

Comments

    No one has commented yet.