diff --git a/app/models/service.rb b/app/models/service.rb index e9b6f005aec..f7e3f7590ad 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -206,7 +206,11 @@ class Service < ActiveRecord::Base args.each do |arg| class_eval %{ def #{arg}? - ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(#{arg}) + if Gitlab.rails5? + !ActiveModel::Type::Boolean::FALSE_VALUES.include?(#{arg}) + else + ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(#{arg}) + end end } end