is there an event I can write some code for when a Rails application is first started? I want to make sure my administrator user exists whenever the app starts. I am using devise auth framework in case that helps.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It would be better to make a new user in
seeds.rband runrake db:seedbefore starting the application – that’s what it’s for.