You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This devise extension, will ensure that devise will update a flag/timestamp on the model whenever a user is set.
With this kind of feature you could show in your views something like last seen 3 weeks ago or last seen 2 minutes ago.
Installation
You know, add this line to your application's Gemfile:
Besides the column requirement you don't need customizations, but if you want to...
# config/initializers/devise.rbDevise.setupdo |config|
...
# Interval (in seconds) to update the :last_seen_at_attribute attr# config.last_seen_at_interval = 5.minutes# Attribute who will be updated every time a user is set by the Warden's after_save callback# Remember to check if this column name is present on the devise model table.# config.last_seen_at_attribute = :last_seenend
Development
After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rspec to run the tests.
To install this gem onto your local machine, run bundle exec rake install.
To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the devise_last_seen project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Hall of fame!
This gem only could be done with help of other gems like: