[Rails] Re: Devise gem User Authentication

2014-10-08 Thread Mohammed Rashid
I am using rails-devise-pundit, It works perfect. However, I tried to include this code in my controller, but it shows me undefined method `set_rotum' for #RotaController:0x00050413e8 I'm trying to fix this as we speak, However if you have any suggestions. Please try and help. Thanks.

[Rails] Re: Devise gem User Authentication

2014-10-06 Thread Mohammed Rashid
class RotaController ApplicationController before_filter :authenticate_user!, except: ( :Welcome) before_action :set_rotum, only: [:show, :edit, :update, :destroy] # GET /rota # GET /rota.json def index @rota = Rotum.all @is_admin = current_user.try(:admin?) end #

[Rails] Re: Devise gem User Authentication

2014-10-06 Thread Mohammed Rashid
I will take a look at it, thanks for the advice -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Rails] Re: Devise gem User Authentication

2014-10-06 Thread Mohammed Rashid
Jason Fb wrote in post #1159167: What does the controller look like? class RotaController ApplicationController before_filter :authenticate_user!, except: ( :Welcome) before_action :set_rotum, only: [:show, :edit, :update, :destroy] # GET /rota # GET /rota.json def index