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
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
2 matches
Mail list logo