Fix tagged
param not being normalized before querying tags (#10249)
This commit is contained in:
@ -72,6 +72,14 @@ class Tag < ApplicationRecord
|
||||
.limit(limit)
|
||||
.offset(offset)
|
||||
end
|
||||
|
||||
def find_normalized(name)
|
||||
find_by(name: name.mb_chars.downcase.to_s)
|
||||
end
|
||||
|
||||
def find_normalized!(name)
|
||||
find_normalized(name) || raise(ActiveRecord::RecordNotFound)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
Reference in New Issue
Block a user