Skip to content
This repository
Browse code

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

… views classes
  • Loading branch information...
commit de1060f4e02925c12004f2ae4dd3f28cdb6a8e04 1 parent e08a564
Guillermo Iguaran authored September 17, 2012
2  actionpack/CHANGELOG.md
Source Rendered
@@ -18,7 +18,7 @@
18 18
 
19 19
     *Sergey Nartimov*
20 20
 
21  
-*   Add .rb template handler, this handler simply allows arbitrary Ruby code as a template. *Guillermo Iguaran*
  21
+*   Add .ruby template handler, this handler simply allows arbitrary Ruby code as a template. *Guillermo Iguaran*
22 22
 
23 23
 *   Add `separator` option for `ActionView::Helpers::TextHelper#excerpt`:
24 24
 
2  actionpack/lib/action_view/template/handlers.rb
@@ -10,7 +10,7 @@ def self.extended(base)
10 10
         base.register_default_template_handler :erb, ERB.new
11 11
         base.register_template_handler :builder, Builder.new
12 12
         base.register_template_handler :raw, Raw.new
13  
-        base.register_template_handler :rb, :source.to_proc
  13
+        base.register_template_handler :ruby, :source.to_proc
14 14
       end
15 15
 
16 16
       @@template_handlers = {}
0  actionpack/test/fixtures/ruby_template.rb → actionpack/test/fixtures/ruby_template.ruby
File renamed without changes
6  actionpack/test/template/render_test.rb
@@ -97,12 +97,12 @@ def test_render_raw_template_with_quotes
97 97
     assert_equal %q;Here are some characters: !@#$%^&*()-="'}{`; + "\n", @view.render(:template => "plain_text_with_characters")
98 98
   end
99 99
 
100  
-  def test_render_rb_template_with_handlers
  100
+  def test_render_ruby_template_with_handlers
101 101
     assert_equal "Hello from Ruby code", @view.render(:template => "ruby_template")
102 102
   end
103 103
 
104  
-  def test_render_rb_template_inline
105  
-    assert_equal '4', @view.render(:inline => "(2**2).to_s", :type => :rb)
  104
+  def test_render_ruby_template_inline
  105
+    assert_equal '4', @view.render(:inline => "(2**2).to_s", :type => :ruby)
106 106
   end
107 107
 
108 108
   def test_render_file_with_localization_on_context_level

0 notes on commit de1060f

Please sign in to comment.
Something went wrong with that request. Please try again.