The before_action :set_rotum is where you want to put the access control.
Despite what I said earlier, you don't actually need cancan, but as an
alternative to this implementation you can use something like cancan for access
control.
In your example, you would do something like this (obviously
What does the controller look like?
Try googling for "devise with cancan"
On Oct 6, 2014, at 6:53 AM, Mohammed Rashid wrote:
> This is my code for my index.html.erb scaffold
> as you can see the if else stops a user to "show, edit or destroy" the
> entries. However, they can create a new Ro
This is my code for my index.html.erb scaffold
as you can see the if else stops a user to "show, edit or destroy" the
entries. However, they can create a new Rota entry by clicking New
Rotum. I can get rid of the admin part in Show, edit, destroy and
everyone will be able to do everything. But I
3 matches
Mail list logo