Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CreateUsers < ActiveRecord::Migration
- def self.up
- create_table „users“, :force => true do |t|
- t.string :login, :email, :remember_token
- t.string :crypted_password, :limit => 40
- t.string :salt, :limit => 40
- t.timestamps
- t.datetime :remember_token_expires_at, :activated_at
- t.string :activation_code, :limit => 40
- t.string :password_reset_code, :limit => 40
- t.boolean :enabled, :default => true
- end
- # Erstellen des Administrator Benutzers
- user = User.new
- user.login = "admin"
- user.email = "admin@briefcasten.com"
- user.password = "topsecret"
- user.password_confirmation = "topsecret"
- user.save(false)
- user.send(:activate!)
- end
- def self.down
- drop_table "users"
- end
- end
Add Comment
Please, Sign In to add comment