Flowdock

Notes posted by mileszs

RSS feed
November 12, 2008
6 thanks

Another Example

Do not mistakenly pass class_name as a key/value pair (Hash form). You will get an error including the text ‘class or module needed’. It should look like this:

serialize :some_array, Array

Or, perhaps clearer would be:

serialize(:some_array, Array)

That may seem obvious, but it is common to be in the habit of passing things as a key/value pair.