Sha256: ef3f6302aa71eb55b9344bf511067f6549377e1cecbb8195474e88595352f471

Contents?: true

Size: 323 Bytes

Versions: 5

Compression:

Stored size: 323 Bytes

Contents

class AddDefaultAdminUser < ActiveRecord::Migration
  def self.up
    u = User.new
    u.login = "admin"
    u.password = "password"
    u.password_confirmation = "password"
    u.email = "foo@bar.org"
    u.state = "active"
    u.activated_at = Time.now
    u.is_admin = true
    u.save!
  end

  def self.down
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
branston-0.6.6 lib/branston/db/migrate/20100812143455_add_default_admin_user.rb
branston-0.6.5 lib/branston/db/migrate/20100812143455_add_default_admin_user.rb
branston-0.6.4 lib/branston/db/migrate/20100812143455_add_default_admin_user.rb
branston-0.6.3 lib/branston/db/migrate/20100812143455_add_default_admin_user.rb
branston-0.6.2 lib/branston/db/migrate/20100812143455_add_default_admin_user.rb