fix build

This commit is contained in:
danielgrippi 2011-09-25 13:14:09 -07:00
parent 131166841a
commit 4bd1f0997d
3 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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