diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-18 17:16:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-18 17:16:04 +0000 |
commit | 28edbca47728c8fe045a2b47bae925c09c6d5113 (patch) | |
tree | 40cd21bfae1e59c890abcb327168b430e0ff214c /activerecord/lib/active_record/base.rb | |
parent | 37249f6a864d6f54cb66168fd2e51b409fb5bc63 (diff) | |
download | rails-28edbca47728c8fe045a2b47bae925c09c6d5113.tar.gz rails-28edbca47728c8fe045a2b47bae925c09c6d5113.tar.bz2 rails-28edbca47728c8fe045a2b47bae925c09c6d5113.zip |
Fixed that the dynamic finder like find_all_by_something_boolean(false) didn't work #649 [lmarlow@yahoo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index a79d75bba3..226db25ea3 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -755,7 +755,7 @@ module ActiveRecord #:nodoc: attributes.each { |attr_name| super unless column_methods_hash[attr_name.intern] } attr_index = -1 - conditions = attributes.collect { |attr_name| attr_index += 1; "#{attr_name} #{arguments[attr_index] ? "=" : "IS"} ? " }.join(" AND ") + conditions = attributes.collect { |attr_name| attr_index += 1; "#{attr_name} #{arguments[attr_index].nil? ? "IS" : "="} ? " }.join(" AND ") send(finder, [conditions, *arguments[0...attributes.length]], *arguments[attributes.length..-1]) else super |