aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 226db25ea3..e00f0d31bc 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -750,7 +750,7 @@ module ActiveRecord #:nodoc:
def method_missing(method_id, *arguments)
method_name = method_id.id2name
- if method_name =~ /find_(all_by|by)_([_a-z]+)/
+ if method_name =~ /find_(all_by|by)_([_a-z][_a-z\d]*)/
finder, attributes = ($1 == "all_by" ? :find_all : :find_first), $2.split("_and_")
attributes.each { |attr_name| super unless column_methods_hash[attr_name.intern] }