Class: PublicActivity::ORM::Mongoid::Adapter
- Inherits:
-
Object
- Object
- PublicActivity::ORM::Mongoid::Adapter
- Defined in:
- lib/public_activity/orm/mongoid/adapter.rb
Class Method Summary collapse
-
.create_activity(trackable, options) ⇒ Object
Creates the activity on ‘trackable` with `options`.
-
.create_activity!(trackable, options) ⇒ Object
Creates activity on ‘trackable` with `options`; throws error on validation failure.
Class Method Details
.create_activity(trackable, options) ⇒ Object
Creates the activity on ‘trackable` with `options`
8 9 10 |
# File 'lib/public_activity/orm/mongoid/adapter.rb', line 8 def self.create_activity(trackable, ) trackable.activities.create end |
.create_activity!(trackable, options) ⇒ Object
Creates activity on ‘trackable` with `options`; throws error on validation failure
13 14 15 |
# File 'lib/public_activity/orm/mongoid/adapter.rb', line 13 def self.create_activity!(trackable, ) trackable.activities.create! end |