Downcase tag titles
This commit is contained in:
@@ -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)") }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user