Commit d95174a2fe28442db21a7391d152a81886e74a9a
1 parent
fb68c4e9
Exists in
master
and in
1 other branch
Fixing new notify options for legacy apps.
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
app/models/app.rb
| @@ -47,6 +47,17 @@ class App | @@ -47,6 +47,17 @@ class App | ||
| 47 | def last_deploy_at | 47 | def last_deploy_at |
| 48 | deploys.last && deploys.last.created_at | 48 | deploys.last && deploys.last.created_at |
| 49 | end | 49 | end |
| 50 | + | ||
| 51 | + # Legacy apps don't have notify_on_errs and notify_on_deploys params | ||
| 52 | + def notify_on_errs | ||
| 53 | + !(self[:notify_on_errs] == false) | ||
| 54 | + end | ||
| 55 | + alias :notify_on_errs? :notify_on_errs | ||
| 56 | + | ||
| 57 | + def notify_on_deploys | ||
| 58 | + !(self[:notify_on_deploys] == false) | ||
| 59 | + end | ||
| 60 | + alias :notify_on_deploys? :notify_on_deploys | ||
| 50 | 61 | ||
| 51 | protected | 62 | protected |
| 52 | 63 |