Commit 2a2c2098 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rails5-active-record-class-value' into 'master'

Rails5: Passing a class as a value in an Active Record query is deprecated

See merge request gitlab-org/gitlab-ee!8540
parents 7698983a f35a82c4
......@@ -21,7 +21,7 @@ module EE
# We cannot simply set `has_many :audit_events, as: :entity, dependent: :destroy`
# here since Group inherits from Namespace, the entity_type would be set to `Namespace`.
has_many :audit_events, -> { where(entity_type: ::Group) }, foreign_key: 'entity_id'
has_many :audit_events, -> { where(entity_type: ::Group.name) }, foreign_key: 'entity_id'
belongs_to :file_template_project, class_name: "Project"
......
---
title: 'Rails5: Passing a class as a value in an Active Record query is deprecated'
merge_request: 8540
author: Jasper Maes
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment