How to force an update of a model

24 views
Skip to first unread message

Philipp Kursawe

unread,
Jan 17, 2012, 7:17:05 PM1/17/12
to DataMapper
Given this model

class Slot

property :dongle_name, String

def comment
dongle_name[42..62]
end

def comment=(c)
dongle_name[42..62] = c[0..62-42]
end
end

How can I mark the model for update when comment= is called?
slot.comment = "test"
slot.dirty? => false
Reply all
Reply to author
Forward
0 new messages