Module: HasActivity::Activitize

Defined in:
lib/has_activity/activitize.rb

Instance Method Summary collapse

Instance Method Details

#activitized?Boolean

Returns:

  • (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

Parameters:

  • (Hash)


16
17
18
19
# File 'lib/has_activity/activitize.rb', line 16

def has_activity(options={})
  options[:on] ||= :created_at
  activitize(options)
end