NoMethodError in RailsAdmin::MainController#dashboard

75 views
Skip to first unread message

Amanda Colmenero

unread,
May 13, 2020, 2:54:50 PM5/13/20
to rails_admin
It was everything working perfectly, but suddenly one day I tried to go to http://localhost:3000/admin and the following error appeared:

Does anybody have any ideia why is this happening?

NoMethodError in RailsAdmin::MainController#dashboard

undefined method `dashboard?' for #<ApplicationPolicy:0x00005633c1977cf0>

Extracted source (around line #25):
23
24
25
26
27
28
              
def authorize(action, abstract_model = nil, model_object = nil)
record = model_object || abstract_model && abstract_model.model
if action && !policy(record).send(action_for_pundit(action))
raise ::Pundit::NotAuthorizedError.new("not allowed to #{action} this #{record}")
end
@controller.instance_variable_set(:@_pundit_policy_authorized, true)

Reply all
Reply to author
Forward
0 new messages