0

I have a roles controller which lists all the roles in the system and I want these roles to appear on the devise registration view inside the devise folder. Since i don't have access to the devise controllers so I can pass the data directly, I have created a users controller manually and added a method like below so i can access this method on the URL like 127.0.0.1:3000/users/sign_up

  def sign_up
    @roles = Role.all
  end

This data isn't being displayed on the view instead am getting a null reference error saying i haven't defined it. Am i doing something wrong?

codeninja
  • 75
  • 4

0 Answers0