The HeartbeatFor plugin will update a 'last_activity' datetime column for one or more models. It attempts to do this upon each request, but no more frequently than the given interval to prevent unnecessary load on the database. You only need specify a method that returns a model (with a 'last_activity' column by default) heartbeat_for :model_method [, :column [, :interval]] :column - a datetime column, defaults to "last_activity" :interval - minimum number of seconds between updates, defaults to 2.minutes Place the call to heartbeat_for in a controller, e.g. application.rb The default usage: ================== class ApplicationController < ActionController::Base # update the :last_activity column of :current_user at most every 2 minutes: heartbeat_for :current_user def current_user # return an instance of User end end Specifying the column and interval: ====================================== class ApplicationController < ActionController::Base # update the :some_datetime column of :my_model at most every 42 seconds: heartbeat_for :get_my_model, :some_datetime, 42.seconds end You can also call heartbeat_for multiple times to update many models: ===================================================================== class ApplicationController < ActionController::Base heartbeat_for :current_foo heartbeat_for :current_bar, :last_seen_at heartbeat_for :current_baz, :last_activity, 5.minutes end