From e4e3ba871f2ce6f610d066c5cebba534d69c6bf8 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Thu, 9 Jul 2020 10:44:40 +0200 Subject: [PATCH] suite --- app/mailers/admin_mailer.rb | 2 +- app/models/particular.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index 78a12d6..c8c7c0f 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -9,6 +9,6 @@ class AdminMailer < ActionMailer::Base end def notify_order - mail :to => "ducoin@jrh.fr", :subject => "Nouvelle commande enregistrée par le site", :from => "n.bally@quartz.xyz" + mail :to => "jp.vallon@abela.fr", :subject => "Nouvelle commande enregistrée par le site", :from => "n.bally@quartz.xyz" end end \ No newline at end of file diff --git a/app/models/particular.rb b/app/models/particular.rb index 900e6f4..5de36b4 100644 --- a/app/models/particular.rb +++ b/app/models/particular.rb @@ -14,6 +14,9 @@ class Particular < ActiveRecord::Base #validates :tel, :presence => true, :if => :force_validation? validates :organisation, :presence => true, :if => :validate_pro attr_accessor :force_validation + + + def validate_pro true if self.force_validation and self.pro end