aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-03 23:23:02 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-03 23:23:02 +0000
commit846f0d5ab65eee84d53179d8496f357af03bea2c (patch)
tree74b4676a0b1886131fb4923d6c7534d5529e793d /activerecord
parent02c21bc9868762e29edece16ad91d46c39a4dac1 (diff)
downloadrails-846f0d5ab65eee84d53179d8496f357af03bea2c.tar.gz
rails-846f0d5ab65eee84d53179d8496f357af03bea2c.tar.bz2
rails-846f0d5ab65eee84d53179d8496f357af03bea2c.zip
Fixed that the overwritten respond_to? method didn't take two parameters like the original #391
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG2
-rwxr-xr-xactiverecord/lib/active_record/base.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index af797707b0..e40b8d4760 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed that the overwritten respond_to? method didn't take two parameters like the original #391
+
* Added HasManyAssociation#count that works like Base#count #413 [intinig]
* Fixed handling of binary content in blobs and similar fields for Ruby/MySQL and SQLite #409 [xal]
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 355587aa80..7471e91516 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -905,8 +905,8 @@ module ActiveRecord #:nodoc:
# A Person object with a name attribute can ask person.respond_to?("name"), person.respond_to?("name="), and
# person.respond_to?("name?") which will all return true.
- def respond_to?(method)
- self.class.column_methods_hash[method.to_sym] || respond_to_without_attributes?(method)
+ def respond_to?(method, include_priv = false)
+ self.class.column_methods_hash[method.to_sym] || respond_to_without_attributes?(method, include_priv)
end
private