class CreateNeighborhoods
Create neighborhood migration file
Public Instance Methods
change()
click to toggle source
# File lib/generators/templates/migrations/create_neighborhoods.rb, line 3 def change create_table :neighborhoods do |t| t.string :name t.string :zip_code t.references :city, index: true, foreign_key: true t.references :state, index: true, foreign_key: true t.timestamps null: false end end