Sha256: 505c453306546014f8c7cc0356ffea64c7fa2a7dca4f415c8daa8e0e0f9f3d44

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

class <%= "Create#{singular_name.camelize}Translations" %> < ActiveRecord::Migration
  def change
    create_table <%= ":#{singular_table_name}_translations" %> do |t|
      t.integer <%= ":#{singular_table_name}_id" %>
      t.string :locale

      t.timestamps 
    end
    add_index <%= ":#{singular_table_name}_translations" %>, <%= ":#{singular_table_name}_id" %>
    add_index <%= ":#{singular_table_name}_translations" %>, :locale
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
translatable_records-1.1.1 lib/generators/templates/migration.rb
translatable_records-1.0.7 lib/generators/templates/migration.rb.erb
translatable_records-1.0.6 lib/generators/templates/migration.rb.erb