Module: ActiveMetadata::Base::Config

Defined in:
lib/active_metadata/base.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_metadata(*args) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/active_metadata/base.rb', line 29

def  *args
  options = args.extract_options!
  options[:ancestors] ||= []
  options[:persists_ancestor] ||= false

  before_update :manage_concurrency
  after_save :save_history
  attr_accessor :conflicts, :active_metadata_timestamp, :skip_history_notification

  alias_method :skip_history_notification?, :skip_history_notification

  instance_variable_set("@active_metadata_options", options)

  include ActiveMetadata::Base::InstanceMethods
  include ActiveMetadata::Persistence
  include ActiveMetadata::Stream

end