Hello,
I've got a problem with deserialization of AR "serialize" method (serialize (ActiveRecord::Base) - APIdock) in my tests. It just gives me pure String instead of my data Array.
Example: User > AR::Base serialize :roles, Array end
Console: u = User.new u.roles = ["admin", "support"] u.save # => true
User.first.roles # => ["admin", "support"]
In test environment: User.first.roles # => "--- \n- admin\n"
it is a String. It seems that YAML serialize is not working there but I have no idea what to do to get it working.
I was already trying to figure it out with these, but with no luck. https://rails.lighthouseapp.com/projects/8994/tickets/5002-nested-objects-dont-deserialized-completely-rails-3-beta-4 http://itsignals.cascadia.com.au/?p=10 http://stackoverflow.com/questions/4705867/rails-doesnt-load-classes-on-deserializing-yaml-marshal-objects
Any advice would be greatly appreciated. Martin