Skip to content

Commit

Permalink
Move after_update callback
Browse files Browse the repository at this point in the history
  • Loading branch information
walshyb committed Jan 10, 2025
1 parent 305d684 commit 5c300ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/series.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class Series < ApplicationRecord
maximum: ArchiveConfig.TITLE_MAX,
too_long: ts("must be less than %{max} letters long.", max: ArchiveConfig.TITLE_MAX)

after_update :admin_hidden_series_notification, if: :hidden_by_admin_changed?

# return title.html_safe to overcome escaping done by sanitiser
def title
read_attribute(:title).try(:html_safe)
Expand All @@ -39,6 +37,7 @@ def title
maximum: ArchiveConfig.NOTES_MAX,
too_long: ts("must be less than %{max} letters long.", max: ArchiveConfig.NOTES_MAX)

after_update :admin_hidden_series_notification, if: :hidden_by_admin_changed?
after_save :adjust_restricted
after_update_commit :expire_caches, :update_work_index

Expand Down

0 comments on commit 5c300ea

Please sign in to comment.