aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-28 03:58:01 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-28 03:58:01 +0000
commit0c0610d398a89f5a74c9fee593eee1bb10975a46 (patch)
tree5fa4e4e6658a29baabc0669b338f36c424d9660a /activerecord/lib/active_record/base.rb
parent57c613a6013b351c41a74f986edfbb8bab12691b (diff)
downloadrails-0c0610d398a89f5a74c9fee593eee1bb10975a46.tar.gz
rails-0c0610d398a89f5a74c9fee593eee1bb10975a46.tar.bz2
rails-0c0610d398a89f5a74c9fee593eee1bb10975a46.zip
Use extract_options! rather than Hash test + pop. Closes #10628 [ssoroka]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-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 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)