Programming Ruby on Rails

How to add admin by default while create rails migration

Sometimes in our app, we have not any registration page for signup because the system is based on like one admin & he/she can add users & users just use the login page directly & not necessary for registration page or something like this, so how can we add this one admin while the project setup/migrate to our server.

Open up the seeds.rb file & add something like this

update this line as your requirements.

Then run this command after database migration.

 

 

Fool Dev

I didn't get trained by the school system like other kids, and when I did concentrate on learning, my mind was cluttered and locked by the programming of the system. © Huey Newton