Thursday, June 2, 2011

[Rails] Rails 3.1:: Marshal/deMarshal ActiveRecord instance

Hello everyone!

During I probing Rails 3.1.rc1 noticed along the majors many little changes and deprecations.
Most of them (changes and deprecations) easy fixable except ONE:

If we have:
Dog as ActiveRecord class

puppy = Dog.new
puppy.new_record?
=> true
dumped_puppy = Marshal.load(Marshal.dump(puppy))
dumped_puppy.new_record?
=> false

Why?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate