Ruby on Rails - saving an object with multipurpose columns in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
Saving an Object
If you have an attribute that needs to be saved and retrieved to database as an object, then specify the name of that attribute using the serialize method and it will be handled automatically. The attribute must be declared as a text field. In the model you must declare the type of the field (Hash or Array)