Sha256: 38478ada75bb9834214ea9959c1188cd111ea4ebd8dfab7ad779d9cdec8d273c

Contents?: true

Size: 664 Bytes

Versions: 53

Compression:

Stored size: 664 Bytes

Contents

class DeviseCreate<%= table_name.camelize %> < ActiveRecord::Migration
  def change
    create_table(:<%= table_name %>) do |t|
<%= migration_data -%>

<% attributes.each do |attribute| -%>
      t.<%= attribute.type %> :<%= attribute.name %>
<% end -%>

      t.timestamps
    end

    add_index :<%= table_name %>, :email,                :unique => true
    add_index :<%= table_name %>, :reset_password_token, :unique => true
    # add_index :<%= table_name %>, :confirmation_token,   :unique => true
    # add_index :<%= table_name %>, :unlock_token,         :unique => true
    # add_index :<%= table_name %>, :authentication_token, :unique => true
  end
end

Version data entries

53 entries across 48 versions & 7 rubygems

Version Path
devise-3.0.4 lib/generators/active_record/templates/migration.rb
devise-2.2.8 lib/generators/active_record/templates/migration.rb
loyal_devise-2.2.6 lib/generators/active_record/templates/migration.rb
devise-2.0.6 lib/generators/active_record/templates/migration.rb
devise-2.1.4 lib/generators/active_record/templates/migration.rb
devise-2.2.7 lib/generators/active_record/templates/migration.rb
devise-3.0.3 lib/generators/active_record/templates/migration.rb
devise-3.1.0.rc2 lib/generators/active_record/templates/migration.rb
loyal_devise-2.2.5 lib/generators/active_record/templates/migration.rb
devise-2.2.6 lib/generators/active_record/templates/migration.rb
devise-3.0.2 lib/generators/active_record/templates/migration.rb
devise-3.0.1 lib/generators/active_record/templates/migration.rb
devise-2.2.5 lib/generators/active_record/templates/migration.rb
loyal_devise-2.1.10 lib/generators/active_record/templates/migration.rb
loyal_devise-2.1.7 lib/generators/active_record/templates/migration.rb
loyal_devise-2.1.6 lib/generators/active_record/templates/migration.rb
devise-3.0.0 lib/generators/active_record/templates/migration.rb
loyal_devise-2.1.5 lib/generators/active_record/templates/migration.rb
loyal_devise-2.1.4 lib/generators/active_record/templates/migration.rb
loyal_devise-2.1.3 lib/generators/active_record/templates/migration.rb