summaryrefslogtreecommitdiff
path: root/app/models/concerns/issuable.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 15:06:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 15:06:50 +0000
commit68d3f33d5194c446812d09f079749ddf56f95378 (patch)
tree9cb521544bf72e420a2986ca2fba512274a020eb /app/models/concerns/issuable.rb
parent6a4ffad42050949fcf08e78147575734ae99627e (diff)
downloadgitlab-ce-68d3f33d5194c446812d09f079749ddf56f95378.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r--app/models/concerns/issuable.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 205bf4a5a26..bcb86a33138 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -148,26 +148,6 @@ module Issuable
strip_attributes :title
- # The state_machine gem will reset the value of state_id unless it
- # is a raw attribute passed in here:
- # https://gitlab.com/gitlab-org/gitlab/issues/35746#note_241148787
- #
- # This assumes another initialize isn't defined. Otherwise this
- # method may need to be prepended.
- def initialize(attributes = nil)
- if attributes.is_a?(Hash)
- attr = attributes.symbolize_keys
-
- if attr.key?(:state) && !attr.key?(:state_id)
- value = attr.delete(:state)
- state_id = self.class.available_states[value]
- attributes[:state_id] = state_id if state_id
- end
- end
-
- super(attributes)
- end
-
# We want to use optimistic lock for cases when only title or description are involved
# http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html
def locking_enabled?