Skip to content

patrickespake/pake_browser_detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PakeBrowserDetect

Detects user’s browser.

Can be used in the layer view and the layer controller.

Provides two methods:

  • browser_name
  • browser_is?

The method browser_is? accepts the symbols:

  • :firefox
  • :opera
  • :chrome
  • :safari
  • :ie

Installation


./script/plugin install git://github.com/patrickespake/pake_browser_detect.git

Example

In the layer view:


  <%= browser_name %>
  <%= browser_is? :firefox %>

In the layer controller:


  browser_name
  browser_is? :firefox

Documentation

http://lab.patrickespake.com/pake_browser_detect

Copyright © 2009 Patrick Espake, released under the MIT license

Site: http://www.patrickespake.com
Blog: http://blog.patrickespake.com
Email: patrickespake@gmail.com

Releases

No releases published

Packages

No packages published

Languages