ActiveRecord in Rails 1.2.x has a method: serialize(attr_name,
class_name = Object). I was wondering, given the new JSON
serialization in 2.0, if it will be possible to request JSON instead
of YAML when serializing data to a database column? Same goes for XML.
It seems logical to modify the method to: serialize(column_name,
options = {}).
Then you could do something like:
class User < ActiveRecord::Base
serialize :preferences,
:class_name => ''Hash'',
:format => :json
end
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---