Skip to content
Snippets Groups Projects
Unverified Commit a8958d07 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix featured tags not finding the right tag on save (#11504)

Regression from f371b321
parent dd38c280
No related branches found
No related tags found
No related merge requests found
......@@ -324,7 +324,8 @@
&.active h4 {
&,
.fa,
small {
small,
.trends__item__current {
color: $primary-text-color;
}
}
......@@ -337,6 +338,10 @@
&.active .avatar-stack .account__avatar {
border-color: $ui-highlight-color;
}
.trends__item__current {
padding-right: 0;
}
}
}
......
......@@ -23,7 +23,7 @@ class FeaturedTag < ApplicationRecord
validate :validate_featured_tags_limit, on: :create
def name=(str)
self.tag = Tag.find_or_initialize_by(name: str.strip.delete('#').mb_chars.downcase.to_s)
self.tag = Tag.find_or_create_by_names(str.strip)&.first
end
def increment(timestamp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment