Don't set a default title
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user