summaryrefslogtreecommitdiff
path: root/app/models/deployment.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-14 14:47:00 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-14 14:47:00 +0200
commit30877effb15d8a3eccc13925549a4c97de93c58e (patch)
treecfe0f24ada671e70acfdb3a2b236a2b2cd5bed3e /app/models/deployment.rb
parent6209b60c96d8b380ac184d83647c3c8b0b026cac (diff)
downloadgitlab-ce-30877effb15d8a3eccc13925549a4c97de93c58e.tar.gz
Test environment controller specs
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index 44a0a7fdd10..32799ee27e6 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -24,4 +24,8 @@ class Deployment < ActiveRecord::Base
def short_sha
Commit::truncate_sha(sha)
end
+
+ def last?
+ self == environment.last_deployment
+ end
end