2018-12-23 12:14:25 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
module Gitlab
|
|
|
|
module Database
|
|
|
|
module ArelMethods
|
|
|
|
private
|
|
|
|
|
|
|
|
# In Arel 7.0.0 (Arel 7.1.4 is used in Rails 5.0) the `engine` parameter of `Arel::UpdateManager#initializer`
|
|
|
|
# was removed.
|
|
|
|
# Remove this file and inline this method when removing rails5? code.
|
|
|
|
def arel_update_manager
|
|
|
|
if Gitlab.rails5?
|
|
|
|
Arel::UpdateManager.new
|
|
|
|
else
|
|
|
|
Arel::UpdateManager.new(ActiveRecord::Base)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|