diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-26 00:36:55 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-26 00:36:55 +0000 |
commit | 6636eb16c56a8a44be8fb3ec005cfca52b0b5b4c (patch) | |
tree | ae3597dd27b869e2e67c431f999c64dc168af0f7 /activerecord/lib/active_record/base.rb | |
parent | c3c39b5cb6756e68f6e84cb17bb691a2af7fea28 (diff) | |
download | rails-6636eb16c56a8a44be8fb3ec005cfca52b0b5b4c.tar.gz rails-6636eb16c56a8a44be8fb3ec005cfca52b0b5b4c.tar.bz2 rails-6636eb16c56a8a44be8fb3ec005cfca52b0b5b4c.zip |
Fixed issue that kept :select options from being scoped [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4036 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 facb22c0e9..c58a7bf5c2 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -873,7 +873,7 @@ module ActiveRecord #:nodoc: method_scoping.assert_valid_keys([ :find, :create ]) if f = method_scoping[:find] - f.assert_valid_keys([ :conditions, :joins, :from, :offset, :limit, :readonly ]) + f.assert_valid_keys([ :conditions, :joins, :select, :from, :offset, :limit, :readonly ]) f[:readonly] = true if !f[:joins].blank? && !f.has_key?(:readonly) end @@ -980,7 +980,7 @@ module ActiveRecord #:nodoc: end def construct_finder_sql(options) - sql = "SELECT #{options[:select] || '*'} " + sql = "SELECT #{scope(:find, :select) || options[:select] || '*'} " sql << "FROM #{scope(:find, :from) || options[:from] || table_name} " add_joins!(sql, options) |