Sha256: a8deedd64dfb4a2824f06b18487c35077c624db785fb65acd3d13283896b9987

Contents?: true

Size: 230 Bytes

Versions: 27

Compression:

Stored size: 230 Bytes

Contents

class <%= migration_name.camelize %> < ActiveRecord::Migration
  def change
    add_column :<%= children %>, :<%= name %>_id, :integer
<%- if create_index? -%>
    add_index :<%= children %>, :<%= name %>_id
<%- end -%>
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
scaffold_plus-1.4.1 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.4.0 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.3.0 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.2.1 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.2.0 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.1.0 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.0.0 lib/generators/scaffold_plus/has_many/templates/child_migration.rb