Downcase tag titles

This commit is contained in:
Jorge Manrubia
2025-04-07 10:39:18 +02:00
parent 950aebb409
commit f403ed070c
5 changed files with 18 additions and 16 deletions
+1
View File
@@ -7,6 +7,7 @@ class Tag < ApplicationRecord
has_many :bubbles, through: :taggings
validates :title, format: { without: /\A#/ }
normalizes :title, with: -> { it.downcase }
scope :alphabetically, -> { order("lower(title)") }