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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
9d40646a
Commit
9d40646a
authored
May 26, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Counter Cache not being disabled for acts-on-taggable
parent
35ab669a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
changelogs/unreleased/fix-counter-cache-for-acts-as-taggable.yml
...ogs/unreleased/fix-counter-cache-for-acts-as-taggable.yml
+4
-0
config/initializers/0_acts_as_taggable.rb
config/initializers/0_acts_as_taggable.rb
+4
-0
No files found.
changelogs/unreleased/fix-counter-cache-for-acts-as-taggable.yml
0 → 100644
View file @
9d40646a
---
title
:
Fix counter cache for acts as taggable
merge_request
:
author
:
config/initializers/acts_as_taggable.rb
→
config/initializers/
0_
acts_as_taggable.rb
View file @
9d40646a
...
@@ -3,3 +3,7 @@ ActsAsTaggableOn.strict_case_match = true
...
@@ -3,3 +3,7 @@ ActsAsTaggableOn.strict_case_match = true
# tags_counter enables caching count of tags which results in an update whenever a tag is added or removed
# tags_counter enables caching count of tags which results in an update whenever a tag is added or removed
# since the count is not used anywhere its better performance wise to disable this cache
# since the count is not used anywhere its better performance wise to disable this cache
ActsAsTaggableOn
.
tags_counter
=
false
ActsAsTaggableOn
.
tags_counter
=
false
# validate that counter cache is disabled
raise
"Counter cache is not disabled"
if
ActsAsTaggableOn
::
Tagging
.
reflections
[
"tag"
].
options
[
:counter_cache
]
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