Class: CreateFurtherInformations

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/further/templates/create_further_informations.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/further/templates/create_further_informations.rb', line 2

def change
  create_table :further_informations do |t|
    t.references :furtherable, polymorphic: true
    t.text :info

    t.timestamps
  end
  add_index :further_informations, :furtherable_id
  add_index :further_informations, :furtherable_type
end