Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Registration Controller does not return Flash Messages #1829

Closed
gwlim opened this Issue · 2 comments

2 participants

@gwlim

I originally thought there was an issue with the syntax which is why after registration is complete no flash messages are return, but even after overriding the controller the problem persist.
My issue is that after registration the no flash messages are rendered after redirect back to the default login page.

#routes.rb
devise_for :students, :skip => [:sessions], :controllers => {:registrations=>"registrations",:sessions=>"sessions",:confirmations=>"confirmations"}
as :student do
    post 'students/confirmation' => 'confirmations#create', :as => :student_confirmation
    get 'students/confirmation/new' => 'confirmations#new', :as => :new_student_confirmation
    get 'students/confirmation' => 'confirmations#show'

    get 'students/cancel' => 'registrations#cancel', :as => :cancel_student_registration
    post 'students' => 'registration#create', :as => :student_registration
    get 'students/sign_up' => 'registration#new', :as => :new_student_registration
    get 'students/edit' => 'registration#edit', :as => :edit_student_registration

    get 'signin' => 'sessions#new', :as => :new_student_session
    get 'home' => 'students#home'
    post 'signin' => 'sessions#create', :as => :student_session
    match 'signout' => 'sessions#destroy', :as => :destroy_student_session,
    :via => Devise.mappings[:student].sign_out_via

end

authenticated :student do
    root :to => redirect("/home")
end
    root :to => redirect("/signin")
end
@gwlim

Other controllers like session and confirmation works as expected only registration fails to render the notices.

@josevalim josevalim closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.