22
Mar
Rails Tip: Accessing User Agent Info via Rails
March 22nd, 2007 — 1:25 pm —Since I couldn’t find the info quickly via Google… If you need to access the user agent info of the browser hitting your app use request.env["HTTP_USER_AGENT"]. Chris had given me a pointer to ‘env’ but I found it tough to quickly find any more information on how to use it. Searches like ‘environment variable rails’ turned up squat. There is a browser detect plugin but it was easier to sneak an example then add the plugin.
About slate
slate is a content management system (CMS) developed using Ruby on Rails focused on rapid production of traditional websites created by WVU Web Services. Read more about why we created slate and a longer list of features of slate. You can also check out a list of sites using slate. If you have questions or comments let us know but if it's a question about open sourcing slate have a look at this article first.Archives
Recent articles
- No Wonder Rails Is Default in Mac OS X Server...
- Good News: An Open Sourced slate Is Coming
- The WVU Open Source License
- Implementation idea: .do templates
- Keeping slate Humming - Part 1
- Campfire for Design & Keeping Your Tag Cloud Running
- Custom configuration settings made easy
- HOW-TO: Add a Gallery to Your Site
- JSONRequest.post Example
- Miscellaneous
Articles
Add comment
You are adding a new comment