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.
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
#
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
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
4 matches
Mail list logo