summaryrefslogtreecommitdiff
path: root/app/models/environment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r--app/models/environment.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb
index baed106e8c8..f6fdb8d1ecf 100644
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -25,4 +25,10 @@ class Environment < ActiveRecord::Base
def nullify_external_url
self.external_url = nil if self.external_url.blank?
end
+
+ def deployed_to?(ref)
+ return unless last_deployment
+
+ last_deployment.deployed_to(ref)
+ end
end