Class: CreateEditableAreas
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateEditableAreas
- Defined in:
- lib/generators/templates/create_editable_areas.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/templates/create_editable_areas.rb', line 2 def change create_table :editable_areas do |t| t.string :title, null: false t.text :content t. end add_index :editable_areas, :title end |