Business intelligence made simple
Sub ; with , for check emails
Andrew Kane25194f8f7bfb
diff --git a/app/models/blazer/check.rb b/app/models/blazer/check.rbindex 666cfb1f..ff7d3c8b 100644--- a/app/models/blazer/check.rb+++ b/app/models/blazer/check.rb@@ -6,6 +6,7 @@ module Blazervalidates :query_id, presence: truebefore_validation :set_state+ before_validation :fix_emailsdef set_stateself.state ||= "new"@@ -15,6 +16,12 @@ module Blazeremails.to_s.downcase.split(",").map(&:strip)end+ def fix_emails+ # some people like doing ; instead of ,+ # but we know what they mean, so let's fix it+ self.emails = emails.gsub(";", ",") if emails.present?+ end+def update_state(result)check_type =if respond_to?(:check_type)