Identify device when identifying the root path
This commit is contained in:
parent
5f9d653598
commit
2d29493f1a
|
@ -474,7 +474,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
session[:mobile_param] = if request.path.eql?(@mobile_path)
|
session[:mobile_param] = if request.path.eql?(@mobile_path)
|
||||||
'1'
|
'1'
|
||||||
elsif request.path.eql?(root_path)
|
elsif (request.path.eql?(root_path) && mobile_device?)
|
||||||
redirect_to mobile_path
|
redirect_to mobile_path
|
||||||
elsif params[:mobile]
|
elsif params[:mobile]
|
||||||
params[:mobile]
|
params[:mobile]
|
||||||
|
@ -501,9 +501,8 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
session[:mobile_param] = if (request.path.eql?(@mobile_path))
|
session[:mobile_param] = if (request.path.eql?(@mobile_path))
|
||||||
'1'
|
'1'
|
||||||
elsif request.path.eql?(root_path)
|
|
||||||
redirect_to mobile_path
|
elsif (request.path.eql?(@mobile_app_path) && mobile_device?)
|
||||||
elsif request.path.eql?(@mobile_app_path)
|
|
||||||
redirect_to root_path(mobile: 0)
|
redirect_to root_path(mobile: 0)
|
||||||
elsif params[:mobile]
|
elsif params[:mobile]
|
||||||
params[:mobile]
|
params[:mobile]
|
||||||
|
|
Loading…
Reference in New Issue