tessad
tessad

Reputation: 1219

public_activity rails uninitialized constant ::PublicActivity

I've been trying to work out how to add public_activity to my rails app.

I have added the gemfile and bundled succesfully

In my guidelines.rb (model) I have

class Guideline < ActiveRecord::Base
  include PublicActivity::Model
 tracked


    def to_param
        "#{id} #{title}".parameterize
    end

  attr_accessible :content, :hospital, :title, :user_id, :guideline_id, :specialty, :updated_by, :current_user, :subtitle, :slug, :comments

 belongs_to :user
 has_many :favourite_guidelines

but I'm getting the error

uninitialized constant Guideline::PublicActivity

Do I need to add something else for this to work?

Upvotes: 1

Views: 1054

Answers (1)

Zippie
Zippie

Reputation: 6088

Checkout if you named your files correctly,it's probably a typo. Do you have a public_activitiy.rb or a publicactivity.rb? Cause it should be the first one. Hope this helped :)

Or probably what Benjamin said, restart your server :)

Upvotes: 4

Related Questions