Class: CreateComments
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateComments
- Defined in:
- lib/generators/templates/create_comments.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/templates/create_comments.rb', line 2 def change create_table :comments do|t| t.text :content t.string :title t.references :comment, :polymorphic => true t. end end |