Module: ActiveModel::Shaz

Defined in:
lib/active_model/shaz.rb,
lib/active_model/shaz/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure_for(clazz) ⇒ Object



24
25
26
27
28
# File 'lib/active_model/shaz.rb', line 24

def self.configure_for clazz
  [:state_tracking, :shaz].each do |name|
    clazz.send :include, "ActiveModel::#{name.to_s.camelize}".constantize
  end
end

Instance Method Details

#destroy_itObject Also known as: destroyed



18
19
20
21
# File 'lib/active_model/shaz.rb', line 18

def destroy_it
  self.destroy
  self
end

#save_itObject Also known as: saved



6
7
8
9
# File 'lib/active_model/shaz.rb', line 6

def save_it
  self.save
  self
end

#update_it(*args) ⇒ Object Also known as: updated_with



12
13
14
15
# File 'lib/active_model/shaz.rb', line 12

def update_it *args
  self.update *args
  self
end