summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
diff options
context:
space:
mode:
authorVinnie Okada <vokada@mrvinn.com>2015-03-24 20:03:22 -0600
committerVinnie Okada <vokada@mrvinn.com>2015-03-24 20:03:22 -0600
commit057c8c344b6518cb50b81607e0f88734fc164a9e (patch)
tree996afee0c0f33bd6308f83b330a179dc29dfb48a /app/models/merge_request.rb
parent637ca0b388382112850fd3052a961bb07db34d14 (diff)
parentb9372c999707558b695fa401b4f660a3d38fce86 (diff)
downloadgitlab-ce-057c8c344b6518cb50b81607e0f88734fc164a9e.tar.gz
Merge branch 'master' into markdown-tags
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r--app/models/merge_request.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 798306f6dcc..5634f9a686e 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -105,6 +105,15 @@ class MergeRequest < ActiveRecord::Base
state :unchecked
state :can_be_merged
state :cannot_be_merged
+
+ around_transition do |merge_request, transition, block|
+ merge_request.record_timestamps = false
+ begin
+ block.call
+ ensure
+ merge_request.record_timestamps = true
+ end
+ end
end
validates :source_project, presence: true, unless: :allow_broken