I use hstore with Postgres 9.2 and Rails 3.2 to store my object like this:
class User
user_hstore = {:user_id =>"123", :user_courses => [1,2,3]}
end
Now, when I retrieve user_courses, I get a string like this:
'[1, 2, 3]'
How do I convert this string to Rails array? Better yet, is there a way to store an array within a hstore object so that Rails will automatically retrieve it as array type?
serializeand hstore functionality, there isn't a readymade solution for this.