diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-07-17 04:00:23 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-07-20 22:27:41 +0300 |
commit | 3bb9b9a18d6ead883d4dfc05cecff810ca322fd4 (patch) | |
tree | 72d7d5346239f9c21b79429a28eb477f24a2e3ea /lib | |
parent | fe84d3e1017132790b4b4206562857eccafe4a10 (diff) |
Fix deprecation warnings for rails 6.1
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diaspora/taggable.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diaspora/taggable.rb b/lib/diaspora/taggable.rb index ec9f9e6d8..6a75a1f38 100644 --- a/lib/diaspora/taggable.rb +++ b/lib/diaspora/taggable.rb @@ -15,8 +15,8 @@ module Diaspora # tag's name is limited to 255 charchters according to ActsAsTaggableOn gem, so we check the length of the name for each tag def tag_name_max_length - self.tag_list.each do |tag| - errors[:tags] << I18n.t('tags.name_too_long', :count => 255, :current_length => tag.length) if tag.length > 255 + tag_list.each do |tag| + errors.add(:tags, I18n.t("tags.name_too_long", count: 255, current_length: tag.length)) if tag.length > 255 end end protected :tag_name_max_length |