Skip to content
Extraits de code Groupes Projets
Valider 41758e03 rédigé par echarp's avatar echarp
Parcourir les fichiers

Quick correction, so that event or orga submitter is automatically filled with...

Quick correction, so that event or orga submitter is automatically filled with contact email if blank
parent 3387a38b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -61,7 +61,7 @@ class Event < ActiveRecord::Base ...@@ -61,7 +61,7 @@ class Event < ActiveRecord::Base
self.decision_time = Time.zone.now self.decision_time = Time.zone.now
# Populate submitter using contact info if absent # Populate submitter using contact info if absent
self.submitter ||= contact self.submitter = contact if submitter.blank?
end end
before_validation on: :update do before_validation on: :update do
......
...@@ -21,7 +21,7 @@ class Orga < ActiveRecord::Base ...@@ -21,7 +21,7 @@ class Orga < ActiveRecord::Base
self.submission_time ||= Time.zone.now self.submission_time ||= Time.zone.now
# Populate submitter using contact info if absent # Populate submitter using contact info if absent
self.submitter ||= contact self.submitter = contact if submitter.blank?
end end
after_create do after_create do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter