AO3-4514: Fix chapter count cache when draft is first posted #2487
+2
−0
app/models/chapter.rb
| @@ -78,6 +78,8 @@ def fix_positions | ||
| end | ||
| end | ||
| + after_save :invalidate_chapter_count, | ||
| + if: Proc.new { |chapter| chapter.posted_changed? } |
|
Align the parameters of a method call if they span more than one line.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
|
Looks good to me! (For anyone driving by and wondering why I'm not asking about automated tests, the Chapters: 0/1 bug wasn't reproducible in them.)
2 checks passed
Details
continuous-integration/travis-ci/pr
The Travis CI build passed
hound
2 violations found.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://otwarchive.atlassian.net/browse/AO3-4514
Trigger cache invalidation when a draft chapter is posted