summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-07-11 16:18:04 +0000
committerRobert Speicher <rspeicher@gmail.com>2019-07-11 16:18:04 +0000
commita06107582f1271d2724f83d8606488b78cf03144 (patch)
treed36e6f6ee52057124e2a3cf146435ec1c405adf4
parent7fa7f7acb258e15a528d2fa962ca40ebe7fd22fb (diff)
parent0131750549c40a65111b63745d2cffaf10d3069e (diff)
downloadgitlab-ce-a06107582f1271d2724f83d8606488b78cf03144.tar.gz
Merge branch '51575-remove-rails-4-specific-code-from-fromunion-from_union' into 'master'
Remove Rails 4-specific code from `FromUnion.from_union` Closes #51575 See merge request gitlab-org/gitlab-ce!30587
-rw-r--r--app/models/concerns/from_union.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/concerns/from_union.rb b/app/models/concerns/from_union.rb
index 9b8595b1211..e28dee34815 100644
--- a/app/models/concerns/from_union.rb
+++ b/app/models/concerns/from_union.rb
@@ -40,11 +40,7 @@ module FromUnion
.new(members, remove_duplicates: remove_duplicates)
.to_sql
- # This pattern is necessary as a bug in Rails 4 can cause the use of
- # `from("string here").includes(:foo)` to break ActiveRecord. This is
- # fixed in https://github.com/rails/rails/pull/25374, which is released as
- # part of Rails 5.
- from([Arel.sql("(#{union}) #{alias_as}")])
+ from(Arel.sql("(#{union}) #{alias_as}"))
end
# rubocop: enable Gitlab/Union
end