mardi 5 janvier 2016

Rails Devise after_sign_in_path_for(resource)

I have two devise models namely user and technician. I want technicians to be directed to a particular page when they login so I implemented it according to the devise tutorial and put this in the application controller

def after_sign_in_path_for(resource)
  case resource.class
  when technician
    new_services_path  
  when user
    root_path
  end
end

but I get this error. enter image description here what am I missing here?

Aucun commentaire:

Enregistrer un commentaire