ruby on rails - Devise invalid forgot password URL -


i have model user. , models

cabase < user lauser < user

both models has:

devise :database_authenticatable, :recoverable, :rememberable,      :trackable, :validatable 

lauser- users have access admin area. cabase - users has access front-end.

when click on forgot password on cabase login form, mails me link like:

site_name/admin/password/edit?reset_password_token=gtwswqk8hh2-6p4chp 

but need to

site_name/password/edit?reset_password_token=gtwswqk8hh2-6p4chp 

also have actions in applicationcontroller

def after_sign_in_path_for(resource)     if resource.is_a?(lauser)       admin_root_path     else       dashboard_index_path     end   end    def after_sending_reset_password_instructions_path_for(resource)     if resource.is_a?(lauser)       admin_root_path     else       dashboard_index_path     end   end 

what can it?

upd1:

get 'dashboard/index'    activeadmin.routes(self)   devise_for :la_users, activeadmin::devise.config   devise_for :ca_base, path: '', path_names: {sign_in: 'login'}   # priority based upon order of creation: first created -> highest priority.   # see how routes lay out "rake routes".    # can have root of site routed "root"   root 'welcome#index'    resource :ca_administrators, only: [:new, :create] 

problem in don't checked role have current user.

code devise mailer.

 if record.is_a?(lauser)       controller = 'active_admin/devise/passwords'     else       controller = 'devise/passwords'     end      edit_password_url = url_for(         controller: controller,         action: :edit,         reset_password_token: token     ) 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -