Skip to content

Instantly share code, notes, and snippets.

#application controller
around_filter :update_user_seen_on
def update_user_seen_on
yield
if signed_in?
current_user.last_seen_on = DateTime.now
current_user.save