app/controllers/application_controller.rb
def user_on_mobile?
			type = request.user_agent.downcase
			MOBILE_BROWSERS.each do |m|
				if type.match(m)
					session[:mobile_param] = 1
				else
					session[:mobile_param] = 0
				end
			end
		end
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def user_on_mobile?
			type = request.user_agent.downcase
			MOBILE_BROWSERS.each do |m|
				if type.match(m)
					session[:mobile_param] = 1
				else
					session[:mobile_param] = 0
				end
			end
		end
def user_on_mobile? type = request . user_agent . downcase MOBILE_BROWSERS . each do | m | if type . match ( m ) session [ :mobile_param ] = 1 else session [ :mobile_param ] = 0 end end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .