diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-26 16:36:14 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-26 16:36:14 -0700 |
commit | bdc5141652770fd227455681cde1f9899f55b0b9 (patch) | |
tree | cace53ff2962478db07e47a8e6443523815750be /activerecord/lib/active_record/relation.rb | |
parent | 8436e2c2bd91c1a57fb1273218a5428cc2c6b45a (diff) | |
download | rails-bdc5141652770fd227455681cde1f9899f55b0b9.tar.gz rails-bdc5141652770fd227455681cde1f9899f55b0b9.tar.bz2 rails-bdc5141652770fd227455681cde1f9899f55b0b9.zip |
Move the `from` bind logic to a `FromClause` class
Contrary to my previous commit message, it wasn't overkill, and led to
much cleaner code.
[Sean Griffin & anthonynavarre]
Diffstat (limited to 'activerecord/lib/active_record/relation.rb')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index d4cd63155c..a9b43ac816 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -5,12 +5,12 @@ module ActiveRecord # = Active Record Relation class Relation MULTI_VALUE_METHODS = [:includes, :eager_load, :preload, :select, :group, - :order, :joins, :references, :from_bind, + :order, :joins, :references, :extending, :unscope] - SINGLE_VALUE_METHODS = [:limit, :offset, :lock, :readonly, :from, :reordering, + SINGLE_VALUE_METHODS = [:limit, :offset, :lock, :readonly, :reordering, :reverse_order, :distinct, :create_with, :uniq] - CLAUSE_METHODS = [:where, :having] + CLAUSE_METHODS = [:where, :having, :from] INVALID_METHODS_FOR_DELETE_ALL = [:limit, :distinct, :offset, :group, :having] VALUE_METHODS = MULTI_VALUE_METHODS + SINGLE_VALUE_METHODS + CLAUSE_METHODS |