Thanks Ted, it's really useful to know that you can do this. Will come in handy in future.
cheers, DAZ On Apr 6, 10:04 pm, Ted Han <t...@knowtheory.net> wrote: > DataMapper keeps track of what the state of your attributes were when they > were fetched from your data store (the clean attributes), and tracks which > objects have changed by comparing the current attributes to the clean > attributes. If there is any deviation between current and clean attributes > they are referred to as "dirty". A dirty object needs work to be done when > a save is called. Existing clean objects do not require work to be done > when save is called on them. > > It's a work saving algorithm. > > -T > > > > > > > > On Wed, Apr 6, 2011 at 4:58 PM, DAZ <daz4...@gmail.com> wrote: > > Sorry to hijack this thread .... but what exactly is a 'dirty' > > attribute? > > > DAZ > > > On Apr 6, 2:59 pm, RipTheJacker <kab...@gmail.com> wrote: > > > model.attribute_dirty?(name) > > > > On Apr 6, 7:51 am, Michishige Kaito <chris.webs...@gmail.com> wrote: > > > > > Hey, > > > > > I have a certain after :save hook that only needs to run if the > > resource is > > > > #new? or a certain attribute has changed. How would I check for the > > dirt > > > > state of this attribute? > > > > > Thanks in advance, folks =) > > > -- > > You received this message because you are subscribed to the Google Groups > > "DataMapper" group. > > To post to this group, send email to datamapper@googlegroups.com. > > To unsubscribe from this group, send email to > > datamapper+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/datamapper?hl=en. -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to datamapper@googlegroups.com. To unsubscribe from this group, send email to datamapper+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.