Module: HasActivity::Activitize
- Defined in:
- lib/has_activity/activitize.rb
Instance Method Summary collapse
- #activitized? ⇒ Boolean
-
#has_activity(options = {}) ⇒ Object
Give a model activity methods.
Instance Method Details
#activitized? ⇒ Boolean
3 4 5 |
# File 'lib/has_activity/activitize.rb', line 3 def activitized? false end |
#has_activity(options = {}) ⇒ Object
Give a model activity methods
Example:
class User < ActiveRecord::Base
has_activity :on => :created_at
end
16 17 18 19 |
# File 'lib/has_activity/activitize.rb', line 16 def has_activity(={}) [:on] ||= :created_at activitize() end |