Can CanCan be used to limit which parameterized views a user can access?
We produce images that users buy individual access to.
For instance:
Bob has access to images 1, 3, and 4.
Joe has access to images 2 and 4.
Steve has access to image 5.
The url would be something like site.com/images/1.
Is there a way I can restrict which number (parameter) of a view a user can view? With or without CanCan?
I’m using Rails 3.2.1
Thanks
Here’s an example from one of my projects.
classes
somewhere in ability.rb
somewhere in app_controller.rb
Hope you can use this snippet for your needs.