NameError in ActivitiesController#index uninitialized constant ActivitiesController::PublicActivity

42 views
Skip to first unread message

Emanuel Coen

unread,
Aug 2, 2018, 7:01:30 AM8/2/18
to Public Activity
class ActivitiesController < ApplicationController
def index
@activities = PublicActivity::Activity.order("created_at desc")
end
end

I get the same error when I want to create a new model of the tracked model ( a List instead of a Recipe in my case).

Im pretty lost if someone can help I would be really thankful. Can post more code or repo if needed.



Emanuel Coen

unread,
Aug 2, 2018, 8:28:43 AM8/2/18
to Public Activity
I solved the problem by adding "::"  before PublicActivity
Reply all
Reply to author
Forward
0 new messages