Sha256: 941b579b3c6b717a2acbd79b1ece354d3ed2ebc36122ee05ee25f508a632a44e
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
Lanes::DB::Seed.add do # This could totes be better written unless Lanes::User.exists?(1) u = Lanes::User.new( name: "Administrator Tester", email: "admin-test@stockor.org", login: "admin", role_names: ['administrator'] ) u.id = 1 u.password = "password" u.save! end unless Lanes::User.exists?(2) u = Lanes::User.new( name: "Accounting Tester", email: "accounting-test@stockor.org", login: "accounting", role_names: ['accounting'] ) u.id = 2 u.password = "password" u.save! end unless Lanes::User.exists?(3) u = Lanes::User.new( name: "Customer Support Tester", email: "support-test@stockor.org", login: "support", role_names: ['customer_support'] ) u.id = 3 u.password = "password" u.save! end unless Lanes::User.exists?(4) u = Lanes::User.new( name: "Purchasing Tester", email: "purchasing-test@stockor.org", login: "purchasing", role_names: ['purchasing'] ) u.id = 4 u.password = "password" u.save! end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lanes-0.0.3 | db/seed.rb |
lanes-0.0.2 | db/seed.rb |
lanes-0.0.1 | db/seed.rb |