Skip to content

Commit

Permalink
Merge pull request #395 from pinak1180/patch-1
Browse files Browse the repository at this point in the history
patch so it works on rails 5.1
  • Loading branch information
cfis committed May 22, 2017
2 parents 60c5136 + 9fb62b9 commit bb40a9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/composite_primary_keys/associations/association_scope.rb
Expand Up @@ -23,8 +23,8 @@ def self.get_bind_values(owner, chain)
binds
end

def last_chain_scope(scope, table, reflection, owner, association_klass)
join_keys = reflection.join_keys(association_klass)
def last_chain_scope(scope, table, reflection, owner)
join_keys = reflection.join_keys
key = join_keys.key
foreign_key = join_keys.foreign_key

Expand All @@ -46,8 +46,8 @@ def last_chain_scope(scope, table, reflection, owner, association_klass)
scope
end

def next_chain_scope(scope, table, reflection, association_klass, foreign_table, next_reflection)
join_keys = reflection.join_keys(association_klass)
def next_chain_scope(scope, table, reflection, foreign_table, next_reflection)
join_keys = reflection.join_keys
key = join_keys.key
foreign_key = join_keys.foreign_key

Expand Down

0 comments on commit bb40a9e

Please sign in to comment.