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,8 +34,14 @@ class ApplicationController < ActionController::Base
# Overwriting the sign_out redirect path method # Overwriting the sign_out redirect path method
def after_sign_out_path_for(resource_or_scope) def after_sign_out_path_for(resource_or_scope)
# 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 logged_out_path
end end
end
##helpers ##helpers
def all_aspects def all_aspects

View file

@ -103,7 +103,7 @@ class UsersController < ApplicationController
render "users/getting_started" render "users/getting_started"
end end
def go_mobile def logged_out
if user_signed_in? if user_signed_in?
redirect_to root_path redirect_to root_path
end end

View file

@ -52,7 +52,7 @@ describe SessionsController do
end end
it "redirects to / for a non-mobile user" do it "redirects to / for a non-mobile user" do
delete :destroy delete :destroy
response.should redirect_to root_path response.should redirect_to logged_out_path
end end
it "redirects to / for a mobile user" do it "redirects to / for a mobile user" do