Prechádzať zdrojové kódy

Only save if changed

Andrew Kane 9 rokov pred
rodič
commit
26e804c9a5
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      README.md
  2. 1 1
      app/models/blazer/check.rb

+ 1 - 1
README.md

@@ -235,7 +235,7 @@ If any queries have variables, they will show up on the dashboard.
 
 ## Checks
 
-[Demo]()
+[Demo](http://blazer.hero2app.com/checks)
 
 Checks give you a centralized place to see the health of your data.
 

+ 1 - 1
app/models/blazer/check.rb

@@ -22,7 +22,7 @@ module Blazer
       if (state_was || state != "passing") && state != state_was && emails.present?
         Blazer::CheckMailer.state_change(self, state, state_was, rows.size, error).deliver_later
       end
-      save!
+      save! if changed?
     end
   end
 end