Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Add docs for id_param option of load_resource #728

Merged
merged 1 commit into from Feb 22, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/cancan/controller_additions.rb
Expand Up @@ -96,6 +96,11 @@ def load_and_authorize_resource(*args)
#
# load_resource :find_by => :permalink # will use find_by_permalink!(params[:id])
#
# [:+id_param+]
# Find using a param key other than :id. For example:
#
# load_resource :id_key => :url # will use find(params[:url])
#
# [:+collection+]
# Specify which actions are resource collection actions in addition to :+index+. This
# is usually not necessary because it will try to guess depending on if the id param is present.
Expand Down