2015-12-26 68 views
0

我已經把登錄和註冊在一個頁面,每件事情都很好,除非我遇到錯誤。然後頁面重定向到默認頁面並在那裏顯示錯誤。在我的情況下,登錄將我重定向到默認domain.com/users/sign_in,但註冊將我重定向到domain.com/users。顯示自定義頁面中的錯誤,而不是默認頁面,同時登錄/註冊與設計

的routes.rb

Rails.application.routes.draw do 
    root 'visitor#index' 

    namespace :admin do 
    # get "/stats" => "stats#stats" 
    devise_scope :admin_user do 
     get '/stats/:scope' => 'stats#stats', as: :admin_stats 
    end 
    end 

    devise_for :admin_users, ActiveAdmin::Devise.config 
    ActiveAdmin.routes(self) 
    namespace :client do 
    get 'dashboard' => 'dashboard#index', as: 'dashboard' 
    # resources :verification, only: [:create, :index, :destroy] 
    get 'verification' => 'verification#index', as: 'verification' 
    match 'verification' => 'verification#upload', as: 'verification_upload', via: [:post, :patch] 
    end 

    devise_for :users, class_name: 'FormUser', controllers: { omniauth_callbacks: 'omniauth_callbacks', registrations: 'registrations' } 
    # devise_scope :user do 
    # root to: 'devise/registrations#new' 
    # end 
end 

回答

相關問題