From ab7ae689e9727781ef39b01a836a746ac75352fc Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Tue, 11 Sep 2012 01:08:40 -0500 Subject: Add .rb template handler This handler simply allows arbitrary Ruby code as a template --- actionpack/lib/action_view/template/handlers.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_view/template') diff --git a/actionpack/lib/action_view/template/handlers.rb b/actionpack/lib/action_view/template/handlers.rb index 41b14373a3..52e032bbd8 100644 --- a/actionpack/lib/action_view/template/handlers.rb +++ b/actionpack/lib/action_view/template/handlers.rb @@ -10,6 +10,7 @@ module ActionView #:nodoc: base.register_default_template_handler :erb, ERB.new base.register_template_handler :builder, Builder.new base.register_template_handler :raw, Raw.new + base.register_template_handler :rb, :source.to_proc end @@template_handlers = {} -- cgit v1.2.3