Re: [Rails] Serialize Nested Hash Problem!

2011-07-22 Thread cipher_neo
that could well be the case. I will revert the code and try rename it. I'll get back with results, thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit

Re: [Rails] Serialize Nested Hash Problem!

2011-07-21 Thread Tom Meinlschmidt
do you have the same version of ruby? On Jul 21, 2011, at 12:03 , cipher_neo wrote: the hash comes directly from the params. I store in the serializable column the exact hash that is there, so it seems like the params hash is not an instance of HashWithIndifferentAccess in the new

Re: [Rails] Serialize Nested Hash Problem!

2011-07-21 Thread cipher_neo
Hi tom, yes the versions of ruby are also identical. I have no clue what was happening, but I am going to get around it by converting the hash to json format first then allowing it to be serialized and then retrieving it and doing a JSON.parse on it. After which I will use symbolize_keys! I

Re: [Rails] Serialize Nested Hash Problem!

2011-07-21 Thread Tom Meinlschmidt
how do you serialize? via serialize :params ? don't you have somewhere in the code this? class HashWithIndifferentAccess Hash def to_yaml(opts = {}) self.to_hash.to_yaml(opts) end end there could be difference between env - production/devel, try to load your app as production on your

Re: [Rails] Serialize Nested Hash Problem!

2011-07-21 Thread cipher_neo
I have a call serialize :data in the associated model. Where exactly would I see the code you posted, and what exactly has it got to do with my problem, I don't think I follow. Anyway, I have solved the problem by going from params hash to json to serialized data and then parsing it back

Re: [Rails] Serialize Nested Hash Problem!

2011-07-21 Thread Colin Law
On 21 July 2011 18:43, cipher_neo l33...@gmail.com wrote: I have a call serialize :data I wonder if the problem could be that data is a reserved word in Rails. Using reserved words sometimes appears ok but then gives strange problems. See

[Rails] Serialize Nested Hash Problem!

2011-07-15 Thread Lee Farrell
Hi, I am serializing an attribute in my model with serialize :data The data in question is a hash defined as {:terminal_id = terminal_id, :order_data = table_order_data, :table_id = table_id} I have deployed my app on a few machines and it works well, storing the data above in serialized