[Rails] Re: ActiveRecord serialize method not returning YAML array in test environment.

2011-03-10 Thread Marcin Seroczyński
After all to bypass this I needed to call the data in database directly without involvement of "serialize" AR method. YAML::load(User.first.roles_before_type_cast) And now test environment also directly parses the data and give me correct roles Array. On 9 Mar, 19:24, Marcin S

[Rails] ActiveRecord serialize method not returning YAML array in test environment.

2011-03-09 Thread Marcin Seroczyński
Hello, I've got a problem with deserialization of AR "serialize" method (http://apidock.com/rails/ActiveRecord/Base/serialize/class) 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