I use this tutorial:
http://www.roberthuberdeau.com/articles/9-Blog-tutorial-part-3
I didn’t understand how to do these step:
We only created a role model. We’re left with two choices- finish the scaffold for the role class or create the roles using the command console. I went with the latter as I have command line access to my production environment. I created the following roles, Admin, Moderator, and Author in this exact order. This will be important latter when we set a default user role.
I want to do the second option:
I don’t know how I have to create the roles using the command console. I want to create the following roles: Admin and Worker in this exact order.
can someone write me the commands please?
From the shell run
bundle exec rails console. This opens up an IRB terminal with your Rails environment loaded, and you will have access to methods such as:Role.create({name: "Admin"})