Hey,
I was just wondering what you do to handle the initial user setup with
a project using authlogic.
I'm still in development but what i find annoying is the create new
users function is obviously kept in the admin section. I can't get
into the admin section without a user... You see the problem.
In most cases i have an admin user setup but now that i'm so far in
development everything is being locked down (ie user creating behind
closed doors) and if I make a db change and migrate my user table gets
wiped out.
How should I go about migrating with an initial admin user ?
Fill it out with any ruby code. I used:
User.create(:username => "admin", :password =>
"temp", :password_confirmation => "temp", :email => "admin@temp.com")
puts "Created admin account"
then run: rake db:setup
This will migrate the schema and fill the db from your seed data.
Allows better separation of your seed data from your migration files.
And a distinct place to do it instead of assorted rake files.
Thankis, for your reply I wouldn't have found it had i not started to
search for rake tasks.