How To

suggest change

In your migration

class Users < ActiveRecord::Migration[5.0]
  def change
    create_table :users do |t|
      ...
      t.text :preference
      t.text :tag
      ...
      t.timestamps
    end
  end
end

In your model

class User < ActiveRecord::Base
    serialize :preferences, Hash  
    serialize :tags, Array
end

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Multi-purpose ActiveRecord columns:
*How To

Table Of Contents
45Multi-purpose ActiveRecord columns
55CSV