Module: ThingTank::ForceUpdate

Included in:
ThingTank
Defined in:
lib/thingtank/force_update.rb

Overview

update_attributes seems to be broken for mass_assign_any_attribute, see groups.google.com/group/couchrest/browse_thread/thread/3b6aeb6469a0ea35?pli=1 try to fix it be changing a property (ugly hack), also see github.com/couchrest/couchrest_model/issues/114

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/thingtank/force_update.rb', line 8

def self.included(base)

  base.class_eval do

    property :update_me

    before_validation do
      couchrest_attribute_will_change!('update_me') # or update_me_will_change! will also do
    end

  end

end