Skip to content

Commit

Permalink
style: upgrade rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jun 11, 2024
1 parent 2f14a9c commit 2a3e962
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module ActionPolicy
def policy_for(record:, **opts)
# From https://github.com/GoodMeasuresLLC/draper-cancancan/blob/master/lib/draper/cancancan.rb
record = record.model while record.is_a?(::Draper::Decorator)
super(record: record, **opts)
super
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/action_policy/behaviours/memoized.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def prepended(base)

module InstanceMethods # :nodoc:
def policy_for(record:, **opts)
__policy_memoize__(record, **opts) { super(record: record, **opts) }
__policy_memoize__(record, **opts) { super }
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/action_policy/behaviours/thread_memoized.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def prepended(base)

module InstanceMethods # :nodoc:
def policy_for(record:, **opts)
__policy_thread_memoize__(record, **opts) { super(record: record, **opts) }
__policy_thread_memoize__(record, **opts) { super }
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/action_policy/rails/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module Controller
def authorize!(record = :__undef__, to: nil, **options)
to ||= :"#{action_name}?"

super(record, to: to, **options)
super

self.authorize_count += 1
end
Expand Down

0 comments on commit 2a3e962

Please sign in to comment.