Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add docs for id_param option of load_resource #728

Merged
merged 1 commit into from Feb 22, 2013

Conversation

Projects
None yet
3 participants

Added in #425 but lacked documentation

This pull request passes (merged b0854c10 into b4285ae).

@nashby nashby and 1 other commented on an outdated diff Oct 12, 2012

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 :param_key => :url # will use find(params[:url])
@nashby

nashby Oct 12, 2012

Collaborator

I think it should be :id_param here not :param_key, right?

@zephyr-dev

zephyr-dev Oct 13, 2012

Ya, definitely. Will fix this on Monday.

Ben Moss Add docs for id_param option of load_resource
Added in #425 but lacked documentation
9f7f520

Sorry took so long to update this!

@nashby nashby added a commit that referenced this pull request Feb 22, 2013

@nashby nashby Merge pull request #728 from zephyr-dev/patch-1
Add docs for id_param option of load_resource
ff2b632

@nashby nashby merged commit ff2b632 into ryanb:master Feb 22, 2013

1 check passed

default The Travis build passed
Details
Collaborator

nashby commented Feb 22, 2013

@zephyr-dev thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment