Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added a db/seeds.rb file with a seed site and user

you can now add a seed user by running "rake db:seed".  this will add
an admin user called 'admin' with a password of 'password'.  if you
don't want to use the defaults you can run script/console and cut and
paste the code from seeds.rb into the console, modifying whatever you
like as you go.
  • Loading branch information...
commit 6021f85def20fc83986fb0d3dc6ddd474f64dfc7 1 parent e4e8ada
Toby Cabot ccabot authored
Showing with 6 additions and 2 deletions.
  1. +4 −2 README.rdoc
  2. +2 −0  db/seeds.rb
6 README.rdoc
View
@@ -35,8 +35,10 @@ it should run on any system that runs Rails.
3. Modify <tt>database.yml</tt> to point to your database
4. Run <tt>rake db:migrate</tt> to create the database schema
5. Run <tt>rake fixtures:load</tt> to load the test data
-6. Run <tt>./script/server</tt> to start the development web server
-7. Fire up your web browser and point it to http://localhost:3000
+6. Run <tt>rake db:seed</tt> to load a bootstrap admin user
+7. Run <tt>./script/server</tt> to start the development web server
+8. Fire up your web browser and point it to http://localhost:3000
+9. Log in as <tt>admin</tt> with a password of <tt>password</tt> and enjoy!
== Building Documentation
Gradesheet is documented using the standard, built-in RDoc system. To build
2  db/seeds.rb
View
@@ -0,0 +1,2 @@
+s = Site.find_or_create_by_name 'seed site'
+User.find_or_create_by_login :login => 'admin', :site => s, :password => 'password', :password_confirmation => 'password', :first_name => 'seed', :last_name => 'user', :is_admin => true
Please sign in to comment.
Something went wrong with that request. Please try again.