Sha256: 9b457b1dfd31a1b2f9ed777fa6595036e56d0cbe3e85359f80fd5d1b227a6931
Contents?: true
Size: 535 Bytes
Versions: 19
Compression:
Stored size: 535 Bytes
Contents
# -*- encoding : utf-8 -*- class Add<%= @field.singular_name.foreign_key.camelize %>To<%= @table.plural_name.camelize %> < ActiveRecord::Migration def self.up add_column :<%= @table.plural_name %>, :<%= @field.singular_name.foreign_key %>, :integer add_index :<%= @table.plural_name %>, :<%= @field.singular_name.foreign_key %> end def self.down remove_column :<%= @table.plural_name %>, :<%= @field.singular_name.foreign_key %> remove_index :<%= @table.plural_name %>, :<%= @field.singular_name.foreign_key %> end end
Version data entries
19 entries across 19 versions & 1 rubygems