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
- #destroy_it ⇒ Object (also: #destroyed)
- #save_it ⇒ Object (also: #saved)
- #update_it(*args) ⇒ Object (also: #updated_with)
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_it ⇒ Object Also known as: destroyed
18 19 20 21 |
# File 'lib/active_model/shaz.rb', line 18 def destroy_it self.destroy self end |
#save_it ⇒ Object 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 |