Merge pull request #728 from zephyr-dev/patch-1
Add docs for id_param option of load_resource
This commit is contained in:
commit
ff2b632f15
|
@ -96,6 +96,11 @@ module CanCan
|
|||
#
|
||||
# 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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user