On 16 Aug 2009, at 16:30, Jonathan Stott wrote:

> It does, admittedly, only save 1 line over  
> '@post.attributes= ...,@post.save'.

Hi Jon

Your example is something I would do using Resource#save.


>  It's probably more useful when applied at the Collection or Model  
> level, for example:
>
> User.all(:last_login_at.lte => 60.days.ago).update(:inactive => true)
>
> But it's the intention to make the resource, collection and model  
> APIs as similar as possible.

That's interesting - I'd never thought about using it in that sense.   
Is the best use for #update to restrict it to batch transactions then?

Ashley

-- 
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://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
-~----------~----~----~----~------~----~------~--~---

Reply via email to