Module: Matic

Extended by:
ActiveSupport::Concern
Includes:
ActiveModel::Dirty
Defined in:
lib/matic.rb,
lib/matic/version.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

VERSION =
"0.2.1"

Instance Method Summary collapse

Instance Method Details

#insert(opts = {}) ⇒ Object



41
42
43
# File 'lib/matic.rb', line 41

def insert(opts={})
  super && clear_changes
end

#saveObject



49
50
51
# File 'lib/matic.rb', line 49

def save
  is_new ? insert : update
end

#update(opts = {}, update_doc = @doc) ⇒ Object



45
46
47
# File 'lib/matic.rb', line 45

def update(opts={}, update_doc=@doc)
  super && clear_changes
end