Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f35a82c4
Commit
f35a82c4
authored
Nov 20, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5: Passing a class as a value in an Active Record query is deprecated
parent
45c53ba5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
ee/app/models/ee/group.rb
ee/app/models/ee/group.rb
+1
-1
ee/changelogs/unreleased/rails5-active-record-class-value.yml
...hangelogs/unreleased/rails5-active-record-class-value.yml
+5
-0
No files found.
ee/app/models/ee/group.rb
View file @
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"
...
...
ee/changelogs/unreleased/rails5-active-record-class-value.yml
0 → 100644
View file @
f35a82c4
---
title
:
'
Rails5:
Passing
a
class
as
a
value
in
an
Active
Record
query
is
deprecated'
merge_request
:
8540
author
:
Jasper Maes
type
:
other
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment