1
0
Fork 0
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:
Pablo Crivella 2018-05-16 13:18:03 +02:00
parent 57d0c995cf
commit b6174e4a39

View file

@ -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