This was always a problem for me, as rails doesn't have some mechanisms for session tracking like java frameworks do, what methods do you use to track who is currently logged on your site? I use a simple method by setting up last_visited field with current time every time user clicks somewhere on the site, and then checking for users which have updated that field in (lets say) last 10 minutes. What other methods are there besides this one?
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Eager-loading association count with Arel (Rails 3
- Is there a way to remove IDV Tags from an AIFF fil
- Data loss during sending via $_SESSION from one sc
相关文章
- Page指令 的EnableSessionState="ReadOnly",怎么在web.confi
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
- Rspec controller error expecting <“index”> but
If you are using the
active_record_store
for your sessions, you can try something like this: