diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-08-02 14:01:22 +0200 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-08-11 21:29:57 +0200 |
commit | 49f72e705fa225175834b5e6b2b1f78f1f608b9c (patch) | |
tree | eeb8ab64c3aa954989b420b58b3f646e83782085 /app/models/environment.rb | |
parent | cbafc9ef301dbdc3c3205541cd0f8e31e28ece7a (diff) | |
download | gitlab-ce-49f72e705fa225175834b5e6b2b1f78f1f608b9c.tar.gz |
Show deployment status on a MR view
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 6 |
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 |