I have a model
class News < ActiveRecord::Base
serialize :types, Array
end
My Migration is
create_table "news" do |t|
t.string "types"
end
Usually we are giving
t.text "types"
But here only 3 types are there. So I need mysql to be allocated small space for types. So can I give
t.string "types"
or some limit for an array serialize ?