diff options
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 337f68ba08..5aba0f060a 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1487,7 +1487,7 @@ module ActiveRecord #:nodoc: self.class_eval %{ def self.#{method_id}(*args) - options = args.last.is_a?(Hash) ? args.pop : {} + options = args.extract_options! attributes = construct_attributes_from_arguments([:#{attribute_names.join(',:')}], args) finder_options = { :conditions => attributes } validate_find_options(options) |