Skip to content

Commit

Permalink
Make it clearer why these methods have a bang
Browse files Browse the repository at this point in the history
An `!` means caution, but not much more. These comments help highlight what to be cautious about.

Co-authored-by: mattzollinhofer <matt.zollinhofer@gmail.com>
  • Loading branch information
Burgestrand and mattzollinhofer committed May 8, 2024
1 parent 9045680 commit 266cae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pundit/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def policy_scope(scope)
policy_scope.resolve
end

# Retrieves the policy scope for the given record.
# Retrieves the policy scope for the given record. Raises if not found.
#
# @see https://github.com/varvet/pundit#scopes
# @param user [Object] the user that initiated the action
Expand Down Expand Up @@ -90,7 +90,7 @@ def policy(record)
raise InvalidConstructorError, "Invalid #<#{policy}> constructor is called"
end

# Retrieves the policy for the given record.
# Retrieves the policy for the given record. Raises if not found.
#
# @see https://github.com/varvet/pundit#policies
# @param user [Object] the user that initiated the action
Expand Down

0 comments on commit 266cae0

Please sign in to comment.