public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Use symbols for send and respond_to?.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
clemens (author)
Tue Sep 02 01:00:41 -0700 2008
jeremy (committer)
Tue Sep 02 15:55:22 -0700 2008
commit  abebdf52a3b1db58b9abf9774fa87271d480133a
tree    b51bfb6d7ee82edad1aa48c8c7fab7e82388e5e5
parent  2e240f0eac66fac0bf4c919a45474b7957883624
...
246
247
248
249
 
250
251
252
...
255
256
257
258
 
259
260
261
...
264
265
266
267
 
268
269
270
...
273
274
275
276
 
277
278
279
...
282
283
284
285
 
286
287
288
...
298
299
300
301
 
302
303
304
...
246
247
248
 
249
250
251
252
...
255
256
257
 
258
259
260
261
...
264
265
266
 
267
268
269
270
...
273
274
275
 
276
277
278
279
...
282
283
284
 
285
286
287
288
...
298
299
300
 
301
302
303
304
0
@@ -246,7 +246,7 @@ module ActionView
0
 
0
       alias_method :tag_without_error_wrapping, :tag
0
       def tag(name, options)
0
-        if object.respond_to?("errors") && object.errors.respond_to?("on")
0
+        if object.respond_to?(:errors) && object.errors.respond_to?(:on)
0
           error_wrapping(tag_without_error_wrapping(name, options), object.errors.on(@method_name))
0
         else
0
           tag_without_error_wrapping(name, options)
0
@@ -255,7 +255,7 @@ module ActionView
0
 
0
       alias_method :content_tag_without_error_wrapping, :content_tag
0
       def content_tag(name, value, options)
0
-        if object.respond_to?("errors") && object.errors.respond_to?("on")
0
+        if object.respond_to?(:errors) && object.errors.respond_to?(:on)
0
           error_wrapping(content_tag_without_error_wrapping(name, value, options), object.errors.on(@method_name))
0
         else
0
           content_tag_without_error_wrapping(name, value, options)
0
@@ -264,7 +264,7 @@ module ActionView
0
 
0
       alias_method :to_date_select_tag_without_error_wrapping, :to_date_select_tag
0
       def to_date_select_tag(options = {}, html_options = {})
0
-        if object.respond_to?("errors") && object.errors.respond_to?("on")
0
+        if object.respond_to?(:errors) && object.errors.respond_to?(:on)
0
           error_wrapping(to_date_select_tag_without_error_wrapping(options, html_options), object.errors.on(@method_name))
0
         else
0
           to_date_select_tag_without_error_wrapping(options, html_options)
0
@@ -273,7 +273,7 @@ module ActionView
0
 
0
       alias_method :to_datetime_select_tag_without_error_wrapping, :to_datetime_select_tag
0
       def to_datetime_select_tag(options = {}, html_options = {})
0
-        if object.respond_to?("errors") && object.errors.respond_to?("on")
0
+        if object.respond_to?(:errors) && object.errors.respond_to?(:on)
0
             error_wrapping(to_datetime_select_tag_without_error_wrapping(options, html_options), object.errors.on(@method_name))
0
           else
0
             to_datetime_select_tag_without_error_wrapping(options, html_options)
0
@@ -282,7 +282,7 @@ module ActionView
0
 
0
       alias_method :to_time_select_tag_without_error_wrapping, :to_time_select_tag
0
       def to_time_select_tag(options = {}, html_options = {})
0
-        if object.respond_to?("errors") && object.errors.respond_to?("on")
0
+        if object.respond_to?(:errors) && object.errors.respond_to?(:on)
0
           error_wrapping(to_time_select_tag_without_error_wrapping(options, html_options), object.errors.on(@method_name))
0
         else
0
           to_time_select_tag_without_error_wrapping(options, html_options)
0
@@ -298,7 +298,7 @@ module ActionView
0
       end
0
 
0
       def column_type
0
-        object.send("column_for_attribute", @method_name).type
0
+        object.send(:column_for_attribute, @method_name).type
0
       end
0
     end
0
   end

Comments