demarches-normaliennes/app/models/entreprise.rb
2016-08-30 11:18:43 +02:00

13 lines
280 B
Ruby

class Entreprise < ActiveRecord::Base
belongs_to :dossier
has_one :etablissement, dependent: :destroy
has_one :rna_information, dependent: :destroy
validates_presence_of :siren
before_save :default_values
def default_values
self.raison_sociale ||= ''
end
end