aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorप्रथमेश Sonpatki <csonpatki@gmail.com>2016-07-04 19:00:52 +0530
committerGitHub <noreply@github.com>2016-07-04 19:00:52 +0530
commit6bb8c400322c8db3f28a470358a663a4dd81ed46 (patch)
treeb1b17da5f8431efdc211ef58e654f5253c110163 /activerecord/lib
parent9bdf08c5a57d0411db866124eca4deba5097c30a (diff)
parent2dc48cd4da730980dba46de2d5898666c5f99ed3 (diff)
downloadrails-6bb8c400322c8db3f28a470358a663a4dd81ed46.tar.gz
rails-6bb8c400322c8db3f28a470358a663a4dd81ed46.tar.bz2
rails-6bb8c400322c8db3f28a470358a663a4dd81ed46.zip
Merge pull request #25684 from kivanio/master
fix respond_to? documentation [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index 78bfcf34a9..eadd73aab0 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -209,13 +209,13 @@ module ActiveRecord
# end
#
# person = Person.new
- # person.respond_to(:name) # => true
- # person.respond_to(:name=) # => true
- # person.respond_to(:name?) # => true
- # person.respond_to('age') # => true
- # person.respond_to('age=') # => true
- # person.respond_to('age?') # => true
- # person.respond_to(:nothing) # => false
+ # person.respond_to?(:name) # => true
+ # person.respond_to?(:name=) # => true
+ # person.respond_to?(:name?) # => true
+ # person.respond_to?('age') # => true
+ # person.respond_to?('age=') # => true
+ # person.respond_to?('age?') # => true
+ # person.respond_to?(:nothing) # => false
def respond_to?(name, include_private = false)
return false unless super