oivoodoo / devise_masquerade

Extension for devise, enable login as functionality. Add link to the masquerade_path(resource) and use it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

additional steps for custom routes after and after_back

juansecaro opened this issue · comments

Are there additional steps after adding the controller (following the steps in readme.md)?

I have done exactly that and they are not even called. I am using 2.1.0.

class Admin::MasqueradesController < Devise::MasqueradesController
  protected

  def after_masquerade_path_for(resource)
    "/companies/#{current_user.id}"
  end

  def after_back_masquerade_path_for(resource)
    "/admin/userss"
  end
end

Thank you.

I am sorry, I didn't read the clearly stated paragraph.

Dont forget to update your Devise routes to point at your Custom Authorization Controller

My fault. I apologize.

Commented