#248 ✓resolved
Jeremy Nicoll

Update method

Reported by Jeremy Nicoll | May 5th, 2008 @ 08:53 AM

I have attached a suggestion for an update method for DM. This method only updates attributes and does not save the model. Optional parameters specify which attributes to update.

Comments and changes to this ticket

  • Sam Smoot

    Sam Smoot May 8th, 2008 @ 04:36 PM

    How's this different than #attributes=?

  • Jeremy Nicoll

    Jeremy Nicoll May 8th, 2008 @ 06:30 PM

    If you override the setter attributes in your model, it will activate the custom methods. It also provides somewhat of a safety mechanism just in case you have some attributes you want to protect.

  • Sam Smoot

    Sam Smoot May 8th, 2008 @ 06:46 PM

    • Assigned user set to “Sam Smoot”

    Hmm... ok. I can buy into that. Probably want update_attributes as the name instead tho' since just update sounds a bit like a persistence method.

    I'll apply this momentarily once I whip up a spec...

  • Sam Smoot

    Sam Smoot May 8th, 2008 @ 06:54 PM

    • State changed from “new” to “resolved”


  • Jeremy Nicoll

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket