diff options
-rw-r--r-- | activejob/lib/active_job/arguments.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/association_scope.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb index 6eeca2861d..69a4ad928d 100644 --- a/activejob/lib/active_job/arguments.rb +++ b/activejob/lib/active_job/arguments.rb @@ -6,7 +6,7 @@ module ActiveJob attr_reader :original_exception def initialize(e) #:nodoc: - super ("Error while trying to deserialize arguments: #{e.message}") + super("Error while trying to deserialize arguments: #{e.message}") @original_exception = e set_backtrace e.backtrace end diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb index 43e1e79fcf..b965230e60 100644 --- a/activerecord/lib/active_record/associations/association_scope.rb +++ b/activerecord/lib/active_record/associations/association_scope.rb @@ -113,7 +113,7 @@ module ActiveRecord end end - def next_chain_scope(scope, table, reflection, chain, tracker, assoc_klass, foreign_table, next_reflection) + def next_chain_scope(scope, table, reflection, tracker, assoc_klass, foreign_table, next_reflection) join_keys = reflection.join_keys(assoc_klass) key = join_keys.key foreign_key = join_keys.foreign_key @@ -135,16 +135,16 @@ module ActiveRecord tables = construct_tables(chain, assoc_klass, refl, tracker) - a_reflection = chain.last + owner_reflection = chain.last table = tables.last - scope = last_chain_scope(scope, table, a_reflection, owner, tracker, assoc_klass) + scope = last_chain_scope(scope, table, owner_reflection, owner, tracker, assoc_klass) chain.each_with_index do |reflection, i| table, foreign_table = tables.shift, tables.first unless reflection == chain.last next_reflection = chain[i + 1] - scope = next_chain_scope(scope, table, reflection, chain, tracker, assoc_klass, foreign_table, next_reflection) + scope = next_chain_scope(scope, table, reflection, tracker, assoc_klass, foreign_table, next_reflection) end is_first_chain = i == 0 |