Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename .rb template handler to .ruby to avoid conflicts with mustache…

… views classes
  • Loading branch information...
commit de1060f4e02925c12004f2ae4dd3f28cdb6a8e04 1 parent e08a564
Guillermo Iguaran guilleiguaran authored
2  actionpack/CHANGELOG.md
View
@@ -18,7 +18,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`:
2  actionpack/lib/action_view/template/handlers.rb
View
@@ -10,7 +10,7 @@ def self.extended(base)
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 = {}
0  actionpack/test/fixtures/ruby_template.rb → actionpack/test/fixtures/ruby_template.ruby
View
File renamed without changes
6 actionpack/test/template/render_test.rb
View
@@ -97,12 +97,12 @@ def test_render_raw_template_with_quotes
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
Please sign in to comment.
Something went wrong with that request. Please try again.