Skip to content
Browse files

Merge pull request #728 from zephyr-dev/patch-1

Add docs for id_param option of load_resource
  • Loading branch information...
2 parents ba82241 + 9f7f520 commit ff2b632f1524bac4273fe113968d73ea62114652 @nashby nashby committed Feb 21, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/cancan/controller_additions.rb
View
5 lib/cancan/controller_additions.rb
@@ -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])
@Sija
Sija added a note Mar 12, 2013

So which one is correct: id_key or id_param?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ #
# [:+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.

0 comments on commit ff2b632

Please sign in to comment.
Something went wrong with that request. Please try again.