From edd68a587f412ccdf15613c663acbab341d45017 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 24 Jul 2007 16:48:57 +0000 Subject: Refactored in use of extract_options! (closes #9079) [josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 5ab761932f..5319ec6ec2 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -421,7 +421,7 @@ module ActiveRecord #:nodoc: # person.save! # end def find(*args) - options = extract_options_from_args!(args) + options = args.extract_options! validate_find_options(options) set_readonly_option!(options) @@ -1604,10 +1604,6 @@ module ActiveRecord #:nodoc: end end - def extract_options_from_args!(args) #:nodoc: - args.last.is_a?(Hash) ? args.pop : {} - end - VALID_FIND_OPTIONS = [ :conditions, :include, :joins, :limit, :offset, :order, :select, :readonly, :group, :from, :lock ] -- cgit v1.2.3