Skip to content

Commit

Permalink
Merge pull request #32 from johnrees/patch-1
Browse files Browse the repository at this point in the history
Updated README to include :get_attribute_on_the_spot for cancan
  • Loading branch information
nathanvda committed Dec 13, 2011
2 parents 4d18715 + f82077d commit 5d67d39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ You can use these classes to style the elements.
When using `on_the_spot` together with `cancan`, you will have to explicitly exclude the on_the_spot method,
like so:

before_filter :load_and_authorize_resource, :except => [:update_attribute_on_the_spot]
load_and_authorize_resource :except => [:update_attribute_on_the_spot, :get_attribute_on_the_spot]

The `load_and_authorize_resource` will try to find the object, based on the id in the parameters, but `on_the_spot` uses a different
encoding to store the object, field and id in one attribute. So if you exclude that, there will not be a problem.
Expand Down

0 comments on commit 5d67d39

Please sign in to comment.