Will_change!

Dear all
model person
id: 1,
name: “test”
end
i need some explanation about name_will_change!

On 27 June 2012 10:56, kengsreng tang [email protected] wrote:

Dear all
model person
id: 1,
name: “test”
end
i need some explanation about name_will_change!

you’re not the only one.

On 27 June 2012 10:56, kengsreng tang [email protected] wrote:

Dear all
model person
id: 1,
name: “test”
end
i need some explanation about name_will_change!

I think we need some explanation about what question you are trying to
ask.

Colin

For example:
i have model Person
Class Person
id: 1
name: “test”
end

this code:
Person.name_will_change!
we put above line of code?
what happen when we used “name_will_change!” method?

On 29 June 2012 03:03, kengsreng tang [email protected] wrote:

why we need to put that above line of code?
I think these probably cover it.

http://railscasts.com/episodes/109-tracking-attribute-changes/
http://archives.ryandaigle.com/articles/2008/3/31/what-s-new-in-edge-rails-dirty-object

Colin

Hi Colin L.
it’s very good explanation!

thank very much !!!