diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-28 03:49:35 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-28 03:59:44 +0530 |
commit | 6a776dcc9df437c0bcc3c1ff1d2a79966264bac9 (patch) | |
tree | 46932debde94297b0e3e5e0c1dad48321b35e1cf /activerecord/lib/active_record/base.rb | |
parent | 9521fcbcc295cb1dd34f7d458c40790466a55244 (diff) | |
download | rails-6a776dcc9df437c0bcc3c1ff1d2a79966264bac9.tar.gz rails-6a776dcc9df437c0bcc3c1ff1d2a79966264bac9.tar.bz2 rails-6a776dcc9df437c0bcc3c1ff1d2a79966264bac9.zip |
Use relation.from when constructing a relation
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 cad75f80e5..bbc5bd77c5 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1563,7 +1563,7 @@ module ActiveRecord #:nodoc: # TODO add lock to Arel validate_find_options(options) - relation = arel_table(options[:from]). + relation = arel_table. joins(construct_join(options[:joins], scope)). where(construct_conditions(options[:conditions], scope)). select(options[:select] || (scope && scope[:select]) || default_select(options[:joins] || (scope && scope[:joins]))). |