mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
Add documentation for pundit_params_for method
This commit is contained in:
parent
57d0c995cf
commit
b6174e4a39
1 changed files with 4 additions and 0 deletions
|
@ -242,6 +242,10 @@ protected
|
|||
pundit_params_for(record).permit(*policy.public_send(method_name))
|
||||
end
|
||||
|
||||
# Retrieves the params for the given record.
|
||||
#
|
||||
# @param record [Object] the object we're retrieving params for
|
||||
# @return [ActionController::Parameters] the params
|
||||
def pundit_params_for(record)
|
||||
params.require(PolicyFinder.new(record).param_key)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue