fix build
This commit is contained in:
parent
131166841a
commit
4bd1f0997d
3 changed files with 9 additions and 3 deletions
|
|
@ -34,7 +34,13 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
# Overwriting the sign_out redirect path method
|
||||
def after_sign_out_path_for(resource_or_scope)
|
||||
logged_out_path
|
||||
# mobile_fu's is_mobile_device? wasn't working here for some reason...
|
||||
# it may have been just because of the test env.
|
||||
if request.env['HTTP_USER_AGENT'].match(/mobile/i)
|
||||
root_path
|
||||
else
|
||||
logged_out_path
|
||||
end
|
||||
end
|
||||
|
||||
##helpers
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class UsersController < ApplicationController
|
|||
render "users/getting_started"
|
||||
end
|
||||
|
||||
def go_mobile
|
||||
def logged_out
|
||||
if user_signed_in?
|
||||
redirect_to root_path
|
||||
end
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ describe SessionsController do
|
|||
end
|
||||
it "redirects to / for a non-mobile user" do
|
||||
delete :destroy
|
||||
response.should redirect_to root_path
|
||||
response.should redirect_to logged_out_path
|
||||
end
|
||||
|
||||
it "redirects to / for a mobile user" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue