Module: ConfigureMe::Persistence
Instance Method Summary collapse
Instance Method Details
#save ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/configure_me/persistence.rb', line 9 def save(*) run_callbacks :save do persist_guard do temp_attributes.each_pair do |k,v| write_persist(k, v) end end temp_attributes.each_pair do |k,v| write_cache(k, v) end make_clean end end |
#update_attributes(new_attrs) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/configure_me/persistence.rb', line 23 def update_attributes(new_attrs) new_attrs.each_pair do |k,v| write_attribute(k, v) end save end |