diff options
author | Wei Xie <xieconnect@gmail.com> | 2010-07-23 21:07:09 +0800 |
---|---|---|
committer | Hans de Graaff <hans@degraaff.org> | 2010-07-25 09:08:43 +0200 |
commit | 9e5a99f3b457ca0a4b88ae6ce5906ba7e5c77b69 (patch) | |
tree | f143b8f360adb88c5103871f3ef867fd23a915c7 | |
parent | renamed default role to 'guest' (diff) | |
download | council-webapp-9e5a99f3b457ca0a4b88ae6ce5906ba7e5c77b69.tar.gz council-webapp-9e5a99f3b457ca0a4b88ae6ce5906ba7e5c77b69.tar.bz2 council-webapp-9e5a99f3b457ca0a4b88ae6ce5906ba7e5c77b69.zip |
import User data from db:seed
-rw-r--r-- | db/seeds.rb | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/db/seeds.rb b/db/seeds.rb index 3174d0c..5882a4b 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,7 +1,33 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). -# -# Examples: -# -# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) -# Major.create(:name => 'Daley', :city => cities.first) +# rake db:seed +puts "adding users..." +users = User.create([ + { :name => 'admin', + :email_address => 'admin@g.cn', + :role => 'admin', + :password => 'admin', + :password_confirmation => 'admin'}, + + { :name => 'council member', + :email_address => 'council_member@g.cn', + :role => 'council_member', + :password => 'council_member', + :password_confirmation => 'council_member'}, + + { :name => 'council member 2', + :email_address => 'council_member2@g.cn', + :role => 'council_member', + :password => 'council_member2', + :password_confirmation => 'council_member2'}, + + { :name => 'guest', + :email_address => 'guest@g.cn', + :role => 'guest', + :password => 'guest', + :password_confirmation => 'guest'}, + + { :name => 'developer', + :email_address => 'developer@g.cn', + :role => 'developer', + :password => 'developer', + :password_confirmation => 'developer'} +]) |