Skip to content

Commit

Permalink
Add documentation for id_param to authorize_resource (#836)
Browse files Browse the repository at this point in the history
Currently the id_param is not documented for authorize_resource. This commit adds the documentation.
  • Loading branch information
0llirocks authored May 23, 2024
1 parent 0cdbba7 commit a47f989
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cancan/controller_additions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ def load_resource(*args)
# [:+instance_name+]
# The name of the instance variable for this resource.
#
# [:+id_param+]
# Find using a param key other than :id. For example:
#
# load_resource :id_param => :url # will use find(params[:url])
#
# [:+through+]
# Authorize conditions on this parent resource when instance isn't available.
#
Expand Down

0 comments on commit a47f989

Please sign in to comment.