about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2018-12-07 12:18:37 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-12-07 04:18:37 +0100
commitc1c0f7c5161452ded4373e6aa1cc9f852f8836c1 (patch)
treed7fb0245d82b764451473f9a20212d26f4ff0555 /app/models
parent73be8f38c115c279e3d3961b98bd2b82b9706b05 (diff)
Fix tag mb_chars comparison of profile directory (#9448)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 20b0b7239..c22836afe 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -181,8 +181,8 @@ class Account < ApplicationRecord
   end
 
   def tags_as_strings=(tag_names)
-    tag_names.map! { |name| name.mb_chars.downcase }
-    tag_names.uniq!(&:to_s)
+    tag_names.map! { |name| name.mb_chars.downcase.to_s }
+    tag_names.uniq!
 
     # Existing hashtags
     hashtags_map = Tag.where(name: tag_names).each_with_object({}) { |tag, h| h[tag.name] = tag }
@@ -190,7 +190,7 @@ class Account < ApplicationRecord
     # Initialize not yet existing hashtags
     tag_names.each do |name|
       next if hashtags_map.key?(name)
-      hashtags_map[name.downcase] = Tag.new(name: name)
+      hashtags_map[name] = Tag.new(name: name)
     end
 
     # Remove hashtags that are to be deleted