From d95174a2fe28442db21a7391d152a81886e74a9a Mon Sep 17 00:00:00 2001 From: Nick Recobra Date: Thu, 7 Apr 2011 18:24:38 +0400 Subject: [PATCH] Fixing new notify options for legacy apps. --- app/models/app.rb | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/app/models/app.rb b/app/models/app.rb index a353548..679ae55 100644 --- a/app/models/app.rb +++ b/app/models/app.rb @@ -47,6 +47,17 @@ class App def last_deploy_at deploys.last && deploys.last.created_at end + + # Legacy apps don't have notify_on_errs and notify_on_deploys params + def notify_on_errs + !(self[:notify_on_errs] == false) + end + alias :notify_on_errs? :notify_on_errs + + def notify_on_deploys + !(self[:notify_on_deploys] == false) + end + alias :notify_on_deploys? :notify_on_deploys protected -- libgit2 0.21.2