summaryrefslogtreecommitdiff
path: root/app/models/deployment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index 1f8c5fb3d85..91d85c2279b 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -11,7 +11,7 @@ class Deployment < ActiveRecord::Base
delegate :name, to: :environment, prefix: true
- after_save :create_ref
+ after_create :create_ref
def commit
project.commit(sha)
@@ -102,6 +102,6 @@ class Deployment < ActiveRecord::Base
private
def ref_path
- File.join(environment.ref_path, 'deployments', id.to_s)
+ File.join(environment.ref_path, 'deployments', iid.to_s)
end
end