Ruby on Rails – Get the IP and Browser of a user
If you need to get the IP of a user, you can simply use request.remote.ip
ip = request.remote_ip
If you need to get the user browser, you can use the following
user_browser = request.env[‘HTTP_USER_AGENT’]
Of course, the results would be stored in ip and user_browser respectively.
- Capturing failed logins when using adauth
- Date Pickers in Rails (Internet Explorer and other browsers)
- Viewing your SQLLite Data (Ruby on Rails beginners)
- Google Plus location sharing wasn’t working on an android.
- Setting browser caching
- Rails – What to do check your date searches are not showing the results you expect.
- Want to know what that pic is?? search by uploading an image.
- A neat tool to check the browser environment.