Skip to content

Commit

Permalink
Merge pull request ryanb#728 from zephyr-dev/patch-1
Browse files Browse the repository at this point in the history
Add docs for id_param option of load_resource
  • Loading branch information
nashby committed Feb 22, 2013
2 parents ba82241 + 9f7f520 commit ff2b632
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 @@ -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

0 comments on commit ff2b632

Please sign in to comment.