Marnen Laibow-Koser wrote: > Chris Mear wrote: >> On 17 August 2010 03:35, madisonkel <[email protected]> wrote: >>> My question is what type do you give the variable :preferences for the >>> migration? In: > But I'd worry more about why you're storing an array in the DB. There > are some legitimate use cases for it, but usually it's a sign that you > need to do some more normalization of your DB schema.
Sounds to me like the OP is looking for a "cheap" way to store a bit of schema-less user preferences data in the database. This would be like using a key/value store, but without the overhead of setting up and using something like Redis. IMHO this is a fine use case for serializing a hash or array into a database column. As long as the limitations and performance considerations are well understood. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

