Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-07-11 00:39:39 +0300
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-07-11 08:46:17 +0300
commit0131750549c40a65111b63745d2cffaf10d3069e (patch)
tree46d33f1604d201de4823284ce47c4135f913043f
parent056166db0adbc34a8f7d8cf04136ed1ae976c9bb (diff)
Pass string directly to #from
-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