Don handle collection change on creation

This commit is contained in:
Jorge Manrubia
2025-10-03 16:26:23 +02:00
parent 4daeb2a33b
commit 1dfb871c44
+1 -1
View File
@@ -12,7 +12,7 @@ class Card < ApplicationRecord
has_rich_text :description
before_save :set_default_title, if: :published?
after_save :handle_collection_change, if: :saved_change_to_collection_id?
after_update :handle_collection_change, if: :saved_change_to_collection_id?
scope :reverse_chronologically, -> { order created_at: :desc, id: :desc }
scope :chronologically, -> { order created_at: :asc, id: :asc }