Miles, Yep, this functionality exists. Basically it works just the same like ar does. You can pass in a hash consisting of valid Resource attributes to Model.new or Model.create .. and there is also Resource#attributes and Resource#update_attributes. So basically, there is really no difference in using dm from a controller, compared to ar.
cheers snusnu On Fri, Apr 24, 2009 at 13:32, MilesTogoe <[email protected]> wrote: > > In Active Record you can pass in an entire set of form fields data in a > single hash parameter and it will automagically create or update all the > fields in the table - all the examples I see for DataMapper show either > create or update with each field expressed individually (since all the > examples show only 1 or 2 fields being passed in). Does this > functionality exist in DataMapper ? > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
