#{茶男與藍牌}
Life has to be exciting.
  • Me
  • Online Tools.
From the daily archives: Thursday, February 23, 2012

Discover ActiveModel: Dirty Record

By 茶男 On 23/02/2012 · Leave a Comment

How to find out the old value for an attribute in active model? How to find out whether the value has changed?

If you take a look at the module ActiveModel::Dirty, you will know.

Take a look at the following examples:

Reference: http://api.rubyonrails.org/classes/ActiveModel/Dirty.html

Continue Reading →
  • Categories

    • .NET
    • ActiveRecord
    • Apache
    • Application Server
    • Browser
    • Cantonese
    • CSS
    • Database
    • English
    • General
    • Git
    • IT
    • Java
    • Javascript
    • Linux
    • Mac
    • MySql
    • PHP
    • PostgreSQL
    • Practical Source Code
    • Reflection
    • Ruby
    • SQL
    • Test
    • UI
    • Web
  • Articles

    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
  • Calendar

    February 2012
    M T W T F S S
    « Dec   Mar »
     12345
    6789101112
    13141516171819
    20212223242526
    272829  
  • Meta

    • Log in
    • Entries (RSS)
" http://t.co/M7S1AqLh twitter is so awesome " — chentianwen

#{茶男與藍牌}

Pages

  • Me
  • Online Tools.

The Latest

  • Chef: WARN: HTTP Request Returned 401 Unauthorized: Failed to authenticate as mhasan. Synchronize the clock on your host.
    ntpdate pool.ntp.org […]

More

Thanks for dropping by! Feel free to join the discussion by leaving comments, and stay updated by subscribing to the RSS feed.
© 2011 ${茶男與藍牌}
PlatformPro by PageLines