create_activity doesn't work with include PublicActivity::Common #62

Closed
sashap opened this Issue Jan 24, 2013 · 4 comments

Projects

None yet

2 participants

@sashap

When using (include PublicActivity::Model with tracked), everything works fine. However, for a model where I only wish to record custom activities, and use (include PublicActivity::Common without tracked), I get error messages which references "create_activity" line with following error:

undefined method `public_activity_enabled?' for #< ..model object id...>

My create_activity statement is inside one of the model methods and looks like this:

create_activity(:schedule, :owner => creator, :recipient => account, :params => {:username => self.creator.username})

@farnoy
Chaps member

Which version of p_a are you using?

@sashap

0.5.4

@farnoy
Chaps member

We support using Common standalone only from 1.0, which is nearing it's release. For now, just use:

include PublicActivity::Model
tracked :skip_defaults => true

Sorry :(

@sashap

That works! Thanks for the quick response and a great gem!

@farnoy farnoy closed this Jan 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment