Don't set a default title

This commit is contained in:
Kevin McConnell
2025-02-07 17:54:49 +00:00
parent 334b545fd8
commit 81197bfb49
2 changed files with 4 additions and 5 deletions
+4
View File
@@ -1,6 +1,10 @@
module BubblesHelper
BUBBLE_ROTATION = %w[ 75 60 45 35 25 5 ]
def bubble_title(bubble)
bubble.title.presence || "Untitled"
end
def bubble_rotation(bubble)
value = BUBBLE_ROTATION[Zlib.crc32(bubble.to_param) % BUBBLE_ROTATION.size]
-5
View File
@@ -9,7 +9,6 @@ class Bubble < ApplicationRecord
has_one_attached :image, dependent: :purge_later
before_save :set_default_title
after_save :track_due_date_change, if: :saved_change_to_due_on?
after_save :track_title_change, if: :saved_change_to_title?
@@ -54,8 +53,4 @@ class Bubble < ApplicationRecord
})
end
end
def set_default_title
self.title = title.presence || "Untitled"
end
end