Module: Transient::ActiveRecordExtensions::ActsMethods

Defined in:
lib/transient/active_record_extensions.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_transient(*args) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/transient/active_record_extensions.rb', line 8

def acts_as_transient( *args )
  include InstanceMethods unless included_modules.include?( InstanceMethods )
  options = args.extract_options!
  options.merge!( :single_active => false ) unless options[:single_active]
  #options.merge!( :check_exists => false ) unless options[:check_exists]
  if options[:single_active] != false
    include SingleActive unless included_modules.include?( SingleActive )
    class_attribute :transient_options
    self.transient_options = options
  end
end