This may be my most stupid question yet:
I’ve implemented this tutorial on my Rails 3 app to get Devise up and running with CanCan. What is the right way to enter the first record in your development database, when only admins are allowed to enter a record and a null record isn’t allowed? Do you just hack away some of the code to reduce permissions, then put it back again?
Update: to add to the answer, if you put this in seeds.db it works, even though there’s no password field in the User table:
User.create(:email => ‘me@mysite.com’,:password => ‘secret’)
Use db/seeds.rb to write the code for your admin record. And call rake db:seed to execute that. Make sure you check whether the initial records are already created, so that running rake db:seed won’t duplicate the data.