Hi! I am adding a hash to a serialized column in a DB. When retrieving the data I get back a string though... Any idea why that might happen? Here is the model and a copy and paste of the usage from irb: http://pastie.caboo.se/58220 Hope you have any ideas! Best regards Sebastian -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sebastian probst Eide
2007-May-02 11:19 UTC
Re: Storing hashes in DB but getting strings back
I solved the problem. Never mind. I had written the serialize statement wrong. I had written: serialize :name1, :name2 but writing serialize :name1, Hash serialize :name2, Hash solved the problem. Tralala! Thanks S Sebastian probst Eide wrote:> Hi! > I am adding a hash to a serialized column in a DB. When retrieving the > data I get back a string though... Any idea why that might happen? > > Here is the model and a copy and paste of the usage from irb: > http://pastie.caboo.se/58220 > > Hope you have any ideas! > > Best regards > Sebastian-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---