diff options
author | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2018-04-12 10:08:13 +1000 |
---|---|---|
committer | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2018-04-12 10:17:31 +1000 |
commit | 115bbdac2b8e11ec92241b839665c5811cc8a2fb (patch) | |
tree | dcdc8c7fd86e546015206e8b6a7da6679bfa5e70 /activerecord/lib | |
parent | 733f3cbea8d81170a16425c46d194f3e51e1422e (diff) | |
download | rails-115bbdac2b8e11ec92241b839665c5811cc8a2fb.tar.gz rails-115bbdac2b8e11ec92241b839665c5811cc8a2fb.tar.bz2 rails-115bbdac2b8e11ec92241b839665c5811cc8a2fb.zip |
don't check for immutability when setting skip_preloading as it doesn't effect the arel and the arel may already be generated by fresh_when
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 38a364ff88..3c66d2f8be 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -8,8 +8,8 @@ module ActiveRecord :extending, :unscope] SINGLE_VALUE_METHODS = [:limit, :offset, :lock, :readonly, :reordering, - :reverse_order, :distinct, :create_with, :skip_query_cache, - :skip_preloading] + :reverse_order, :distinct, :create_with, :skip_query_cache] + CLAUSE_METHODS = [:where, :having, :from] INVALID_METHODS_FOR_DELETE_ALL = [:distinct, :group, :having] @@ -19,6 +19,7 @@ module ActiveRecord include FinderMethods, Calculations, SpawnMethods, QueryMethods, Batches, Explain, Delegation attr_reader :table, :klass, :loaded, :predicate_builder + attr_accessor :skip_preloading_value alias :model :klass alias :loaded? :loaded alias :locked? :lock_value |