demarches-normaliennes/app/models/follow.rb

18 lines
402 B
Ruby
Raw Normal View History

class Follow < ActiveRecord::Base
belongs_to :gestionnaire
belongs_to :dossier
validates_uniqueness_of :gestionnaire_id, :scope => :dossier_id
before_create :set_default_date
private
def set_default_date
self.demande_seen_at = DateTime.now
self.annotations_privees_seen_at = DateTime.now
self.avis_seen_at = DateTime.now
self.messagerie_seen_at = DateTime.now
end
2017-04-04 15:27:04 +02:00
end