desktop mode redirects back to original page

This commit is contained in:
r888888888
2017-04-24 12:58:46 -07:00
parent 13189e60b8
commit ba1399abef
3 changed files with 17 additions and 8 deletions

View File

@@ -1,4 +1,6 @@
class StaticController < ApplicationController
before_filter :check_desktop_mode, only: :site_map
def terms_of_service
end
@@ -14,4 +16,18 @@ class StaticController < ApplicationController
def error
end
def site_map
end
private
def check_desktop_mode
if params[:dm]
cookies[:dm] = "1"
redirect_to :back
return false
end
end
end