summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2019-03-28 11:31:14 -0300
committerFelipe Artur <felipefac@gmail.com>2019-03-28 11:31:14 -0300
commitb2fb3a9c62862476a7591ecb5ab4a6a3146e0c49 (patch)
tree8442a290e6071748b4da62e2761365feca49dc40 /app
parent16a3fea3998e813b95d7d09ea31f6a88dc908102 (diff)
downloadgitlab-ce-b2fb3a9c62862476a7591ecb5ab4a6a3146e0c49.tar.gz
Address review comments
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/issuable_states.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/concerns/issuable_states.rb b/app/models/concerns/issuable_states.rb
index 2ebd5013a4c..b722c541580 100644
--- a/app/models/concerns/issuable_states.rb
+++ b/app/models/concerns/issuable_states.rb
@@ -17,11 +17,9 @@ module IssuableStates
# Needed to prevent breaking some migration specs that
# rollback database to a point where state_id does not exist.
# We can use this guard clause for now since this file will
- # be removed on a future the next release.
- return unless self.respond_to?(:state_id)
+ # be removed in the next release.
+ return unless self.has_attribute?(:state_id)
- states_hash = self.class.available_states
-
- self.state_id = states_hash[state]
+ self.state_id = self.class.available_states[state]
end
end