Join table create_join_table :products, :categories Store uses special code flag store :settings, accessors: [ :color, :homepage ], coder: JSON Pluck multiple columns Client.pluck(:id, :name) # SELECT clients.id, clients.name FROM clients # => [[1, 'David'], [2, 'Jeremy'], [3, 'Jose']] Index in migration create_table :messages do |t| t.references :person, :index => true end