diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2015-03-24 20:03:22 -0600 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2015-03-24 20:03:22 -0600 |
commit | 057c8c344b6518cb50b81607e0f88734fc164a9e (patch) | |
tree | 996afee0c0f33bd6308f83b330a179dc29dfb48a /app/models/merge_request.rb | |
parent | 637ca0b388382112850fd3052a961bb07db34d14 (diff) | |
parent | b9372c999707558b695fa401b4f660a3d38fce86 (diff) | |
download | gitlab-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.rb | 9 |
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 |