I want to store an array into a database field. I tried the following method:
class MyStuff < ActiveRecord::Base
serialize :things
end
stuff = MyStuff.new
stuff.things << "pen"
stuff.things << "paper"
stuff.save
I get an error: "The error occurred while evaluating nil.<<"
Is there any other approach?