Skip to content

Commit

Permalink
adds sign_in/sign_out redirect paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jmabry111 committed Oct 3, 2012
1 parent a9d1ca2 commit fb0b90d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/controllers/application_controller.rb
@@ -1,3 +1,12 @@
class ApplicationController < ActionController::Base
protect_from_forgery

private
def after_sign_in_path_for(resource_or_scope)
applicants_path
end

def after_sign_out_path_for(resource_or_pool)
thank_you_path
end
end
6 changes: 6 additions & 0 deletions app/views/static_pages/thank_you.html.erb
@@ -0,0 +1,6 @@
<div class="center hero-unit">
<h1>Thank you for signing out.</h1>
<p>
You may <%= link_to "log back in", new_user_session_path %> at any time, or <%= link_to "start from the beginning", root_path %>.
</p>
</div>
2 changes: 2 additions & 0 deletions config/routes.rb
Expand Up @@ -19,6 +19,8 @@

match 'instructions', to: 'static_pages#instructions'

match 'thank_you', to: 'static_pages#thank_you'

#match '/applicant', to: 'applicants#new', :as => 'applicant', :via => :get
#match '/applicant', to: 'applicants#create', :as => 'applicant', :via => :post
# The priority is based upon order of creation:
Expand Down

0 comments on commit fb0b90d

Please sign in to comment.