Re: [Rails] Devise gem User Authentication

2014-10-06 Thread Jason Fleetwood-Boldt
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

Re: [Rails] Devise gem User Authentication

2014-10-06 Thread Jason Fleetwood-Boldt
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

[Rails] Devise gem User Authentication

2014-10-06 Thread Mohammed Rashid
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