Sha256: cc9d001028f0ec1edb391ad6204aa18dbb7817fa2766b0c05da80bb25cf0c39b

Contents?: true

Size: 231 Bytes

Versions: 23

Compression:

Stored size: 231 Bytes

Contents

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
scaffold_plus-1.7.7 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.7.6 lib/generators/scaffold_plus/has_many/templates/child_migration.rb
scaffold_plus-1.7.5 lib/generators/scaffold_plus/has_many/templates/child_migration.rb