Just a quick 2 cents, I do think that raising an exception is a good idea, I do think that the attributes should be updated on the object.
So that the admin flag would be true on the not-yet persisted object in ruby. That way a user can still call save later and not fear loosing any data. On Aug 18, 12:55 pm, Ashley Moran <[email protected]> wrote: > On 17 Aug 2009, at 01:59, Dan Kubb (dkubb) wrote: > > > Yeah, the more I think about it the more I believe that > > Resource#update should throw an exception when called on a dirty > > resource. I don't think I'm going to bother exploring the variable > > stashing, as there are too many weird edge cases for such little > > benefit. > > I think this is the sanest thing to do in the mean time. And while I > can benefits to having Model, Collection and Resource share a similar > API, I'm still unconvinced that #update actually applies to Resource > at all... > > Ashley > > --http://www.patchspace.co.uk/http://www.linkedin.com/in/ashleymoranhttp://aviewfromafar.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
