mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
FIX: update topic fancy title when updating category name
This commit is contained in:
parent
dfe1d3adfd
commit
3378e2d49f
@ -463,7 +463,7 @@ SQL
|
||||
old_name = changed_attributes["name"]
|
||||
return unless topic.present?
|
||||
if topic.title == I18n.t("category.topic_prefix", category: old_name)
|
||||
topic.update_column(:title, I18n.t("category.topic_prefix", category: name))
|
||||
topic.update_attribute(:title, I18n.t("category.topic_prefix", category: name))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -310,6 +310,7 @@ describe Category do
|
||||
@category.update_attributes(name: 'Troutfishing')
|
||||
@topic.reload
|
||||
expect(@topic.title).to match(/Troutfishing/)
|
||||
expect(@topic.fancy_title).to match(/Troutfishing/)
|
||||
end
|
||||
|
||||
it "doesn't raise an error if there is no definition topic to rename (uncategorized)" do
|
||||
|
Loading…
Reference in New Issue
Block a user