Skip to content

Commit

Permalink
Avoid naming clash.
Browse files Browse the repository at this point in the history
  • Loading branch information
Batou99 committed Mar 22, 2019
1 parent b5961fb commit c03fcc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/graphql-pundit/scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def after_scope(scope = true)
end

def resolve_field(obj, args, ctx)
before_scope_return = apply_scope(@before_scope, obj, args, ctx)
before_scope_return = apply_pundit_scope(@before_scope, obj, args, ctx)
field_return = super(before_scope_return, args, ctx)
apply_scope(@after_scope, field_return, args, ctx)
apply_pundit_scope(@after_scope, field_return, args, ctx)
end

private

def apply_scope(scope, root, arguments, context)
def apply_pundit_scope(scope, root, arguments, context)
return root unless scope
return scope.call(root, arguments, context) if scope.respond_to?(:call)

Expand Down

0 comments on commit c03fcc1

Please sign in to comment.