I want to store user's screen resolution in database when user login. How to detect and store it to database when user login?
Read it with JavaScript (browsers don't send screen resolution information by default, so it isn't available to Ruby or anything else server side unless you make it so), then generate a hidden input, set the name and value based on the data you've gathered, then add it to the form containing the username and password inputs.
Oh, and you might find the window size more useful than the screen resolution. Not everybody maximizes their windows.