Commit 9cc2bdfcac9ec0b40ef7a282703ffced28c82316

Authored by Nathan B
2 parents c31d03b7 44d614ea
Exists in master and in 1 other branch production

Merge pull request #117 from aavenoso/master

Changes to fix notifications when app is set to notify all users
app/models/deploy.rb
... ... @@ -33,7 +33,7 @@ class Deploy
33 33 protected
34 34  
35 35 def should_notify?
36   - app.notify_on_deploys? && app.watchers.any?
  36 + app.notify_on_deploys? && app.notification_recipients.any?
37 37 end
38 38  
39 39 def should_resolve_app_errs?
... ...
app/models/notice.rb
... ... @@ -98,7 +98,7 @@ class Notice
98 98 protected
99 99  
100 100 def should_notify?
101   - app.notify_on_errs? && (Errbit::Config.per_app_email_at_notices && app.email_at_notices || Errbit::Config.email_at_notices).include?(problem.notices_count) && app.watchers.any?
  101 + app.notify_on_errs? && (Errbit::Config.per_app_email_at_notices && app.email_at_notices || Errbit::Config.email_at_notices).include?(problem.notices_count) && app.notification_recipients.any?
102 102 end
103 103  
104 104 def increase_counter_cache
... ...
app/views/layouts/mailer.html.haml
... ... @@ -15,5 +15,5 @@
15 15 %tr
16 16 %td.footer
17 17 Your loyal servant,
18   - = link_to 'Errbit', root_path
  18 + = link_to 'Errbit', root_url
19 19  
... ...