Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Web Browser

Editor Role II

We created a method named editor? that checks whether a user's role is "editor", and returns true or false. The method uses self to refer to the current instance of a User object.

Now that we can determine whether a user has an editor role on the site, let's add a few methods to the Application controller (app/controllers/application_controller.rb) to make sure that users with the editor role can access specific parts of the site.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.