project_activity_cache_observer.rb 194 Bytes
Newer Older
1
2
3
4
5
6
7
8
class ProjectActivityCacheObserver < BaseObserver
  observe :event

  def after_create(event)
    event.project.update_attribute(:last_activity_at, event.created_at) if event.project
  end
end