class ProjectActivityCacheObserver < BaseObserver
  observe :event

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


class ProjectActivityCacheObserver < BaseObserver
  observe :event

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


Use update_column to set :last_activity_at for project
Use update_column to set :last_activity_at for project
