Browse Source

preliminary after-signout page

maybe spruce it up in the future
pull/1/head
Nicolae Claudius 13 years ago
parent
commit
a247bbfc98
  1. 5
      app/controllers/application_controller.rb
  2. 5
      app/controllers/pages_controller.rb
  3. 5
      app/views/pages/signed_out.html.erb

5
app/controllers/application_controller.rb

@ -34,4 +34,9 @@ class ApplicationController < ActionController::Base
render :nothing => true if params[Settings.honeypot].present? render :nothing => true if params[Settings.honeypot].present?
end end
# Overwriting the sign_out redirect path method
def after_sign_out_path_for(resource_or_scope)
page_path('signed_out')
end
end end

5
app/controllers/pages_controller.rb

@ -23,6 +23,11 @@ class PagesController < ApplicationController
@contact_form = ContactForm.new(init) @contact_form = ContactForm.new(init)
when "home" when "home"
options[:layout] = 'home' unless request.xhr? options[:layout] = 'home' unless request.xhr?
when "signed_out"
if user_signed_in?
flash[:warning] = "You are still authenticated"
redirect_to after_sign_in_path_for(current_user) and return
end
end end
render options render options

5
app/views/pages/signed_out.html.erb

@ -0,0 +1,5 @@
<div class="page-header">
<h1>You've signed out of EntryDNS. <strong>Now go mobile.</strong></h1>
<p>Just visit our web site from your mobile phone or tablet.</p>
</div>
Loading…
Cancel
Save