25 Dec '13, 3am


You need to declare an attributes hash which contains the attributes you want to serialize. Attributes must be strings, not symbols. When called, serializable hash will use instance methods that match the name of the attributes hash's keys. In order to override this behavior, take a look at the private method read_attribute_for_serialization

Full article: http://api.rubyonrails.org/classes/ActiveModel/Serializat...