diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-30 15:49:28 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-30 15:49:28 +0000 |
commit | 2bf223051effaaf08c23936aaac16df672ccc899 (patch) | |
tree | 26d8e4aedfb652858a420640fa9ef0d465e6f1dd /activerecord/lib/active_record/base.rb | |
parent | eefe4d0ddd077f5e27caf8bfb5d306ed6cc86ed8 (diff) | |
download | rails-2bf223051effaaf08c23936aaac16df672ccc899.tar.gz rails-2bf223051effaaf08c23936aaac16df672ccc899.tar.bz2 rails-2bf223051effaaf08c23936aaac16df672ccc899.zip |
Added compatibility with camelCase column names for dynamic finders #533 [Dee.Zsombor]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 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 c11b6d23ed..283eb1070a 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -782,7 +782,7 @@ module ActiveRecord #:nodoc: def method_missing(method_id, *arguments) method_name = method_id.id2name - if method_name =~ /find_(all_by|by)_([_a-z][_a-z\d]*)/ + if method_name =~ /find_(all_by|by)_([_a-zA-Z]\w*)/ finder, attributes = ($1 == "all_by" ? :all : :first), $2.split("_and_") attributes.each { |attr_name| super unless column_methods_hash[attr_name.intern] } |