diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-31 14:35:14 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-31 14:35:14 +0000 |
commit | e130b9e01784ac8c5d4743fa121a9d5e3618e151 (patch) | |
tree | 688bc2c1a1e23ab0be3a15c3202cd646ef25e893 /activerecord/lib/active_record/base.rb | |
parent | 8499c24770982b533cc11f3e12171f5151f11e37 (diff) | |
download | rails-e130b9e01784ac8c5d4743fa121a9d5e3618e151.tar.gz rails-e130b9e01784ac8c5d4743fa121a9d5e3618e151.tar.bz2 rails-e130b9e01784ac8c5d4743fa121a9d5e3618e151.zip |
Added a join parameter as the third argument to Base.find_first #426 [skaes@web.de]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index bba321dd9b..bf36e9815b 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -384,8 +384,8 @@ module ActiveRecord #:nodoc: # be used to create the object. In such cases, it might be beneficial to also specify # +orderings+, like "income DESC, name", to control exactly which record is to be used. Example: # Employee.find_first "income > 50000", "income DESC, name" - def find_first(conditions = nil, orderings = nil) - find_all(conditions, orderings, 1).first + def find_first(conditions = nil, orderings = nil, joins = nil) + find_all(conditions, orderings, 1, joins).first end # Creates an object, instantly saves it as a record (if the validation permits it), and returns it. If the save |