1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #7669 from guilleiguaran/rename-rb-handler

Rename .rb template handler to .ruby to avoid conflicts with mustache classes
This commit is contained in:
Carlos Antonio da Silva 2012-09-17 08:13:08 -07:00
commit a2194990fa
4 changed files with 5 additions and 5 deletions

View file

@ -33,7 +33,7 @@
*Sergey Nartimov*
* Add .rb template handler, this handler simply allows arbitrary Ruby code as a template. *Guillermo Iguaran*
* Add .ruby template handler, this handler simply allows arbitrary Ruby code as a template. *Guillermo Iguaran*
* Add `separator` option for `ActionView::Helpers::TextHelper#excerpt`:

View file

@ -10,7 +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
base.register_template_handler :ruby, :source.to_proc
end
@@template_handlers = {}

View file

@ -97,12 +97,12 @@ module RenderTestCases
assert_equal %q;Here are some characters: !@#$%^&*()-="'}{`; + "\n", @view.render(:template => "plain_text_with_characters")
end
def test_render_rb_template_with_handlers
def test_render_ruby_template_with_handlers
assert_equal "Hello from Ruby code", @view.render(:template => "ruby_template")
end
def test_render_rb_template_inline
assert_equal '4', @view.render(:inline => "(2**2).to_s", :type => :rb)
def test_render_ruby_template_inline
assert_equal '4', @view.render(:inline => "(2**2).to_s", :type => :ruby)
end
def test_render_file_with_localization_on_context_level