favgroups: unify find by name methods.
Unify the `name_to_id`, `named`, and `find_by_name` methods into a single `find_by_name_or_id` method that has consistent behavior in how names are normalized.
This commit is contained in:
@@ -52,7 +52,7 @@ module PostSets
|
||||
name = Tag.has_metatag?(tag_array, :favgroup)
|
||||
return nil unless is_single_tag? && name.present?
|
||||
|
||||
@favgroup ||= FavoriteGroup.find_by_name(name)
|
||||
@favgroup ||= FavoriteGroup.find_by_name_or_id(name, CurrentUser.user)
|
||||
end
|
||||
|
||||
def has_explicit?
|
||||
|
||||
Reference in New Issue
Block a user