Class: AddDefaultAdminUser
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddDefaultAdminUser
- Defined in:
- lib/branston/db/migrate/20100812143455_add_default_admin_user.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
14 15 |
# File 'lib/branston/db/migrate/20100812143455_add_default_admin_user.rb', line 14 def self.down end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/branston/db/migrate/20100812143455_add_default_admin_user.rb', line 2 def self.up u = User.new u.login = "admin" u.password = "password" u.password_confirmation = "password" u.email = "[email protected]" u.state = "active" u.activated_at = Time.now u.is_admin = true u.save! end |