Ruby On Code to detect the web browser
by chrismo,
August 29, 2008 04:09
well, that's what I get for...
1 2 3
def test_web_browser() request.env["HTTP_USER_AGENT"].gsub(/\W/, '') end
Ruby On Code to detect the web browser
by chrismo,
August 29, 2008 01:46
Whoops - shorter regexp. I ...
1 2 3 4
def test_web_browser() return translate_user_agent(request.env["HTTP_USER_AGENT"]) end ...
Ruby On Code to detect the web browser
by chrismo,
August 29, 2008 01:43
Here's a more thorough vers...
1 2 3
def test_web_browser() request.env["HTTP_USER_AGENT"].gsub(/[^A-Za-z0-9]/, '') end
Ruby On Code to detect the web browser
by chrismo,
August 29, 2008 01:42
I submitted this earlier, b...
1 2 3
def test_web_browser() return request.env['HTTP_USER_AGENT'].gsub(/\/| /, '') end
Ruby On Code to detect the web browser
by chrismo,
August 28, 2008 17:38
Something like this would d...
I did something similar-ish...