Skip to content

Commit 4a4e619

Browse files
committed
Remove deprecated String#to_a in Networks#show
This also fixes a small issue that was leftover from #279
1 parent ef630be commit 4a4e619

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/controllers/networks_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def ensure_admin!
215215
end
216216

217217
def redirect_to_search
218-
tags = @network.try(:slug).try(:to_a) || (params[:tags] && params[:tags].split('/')) || []
218+
tags = @network.try(:slug).try(:split) || (params[:tags] && params[:tags].split('/')) || []
219219
tags = tags.map { |tag| "##{tag}" }.join(' ')
220220
redirect_to protips_path(search: tags, show_all: params[:show_all])
221221
end

app/models/network.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def tag_with_name!
102102

103103
def correct_tags
104104
if self.tag_list_changed?
105-
self.tags_list = self.tag_list.uniq.select { |tag| Tag.exists?(name: tag) }.reject { |tag| (tag != self.name) && Network.exists?(name: tag) }
105+
self.tag_list = self.tag_list.uniq.select { |tag| Tag.exists?(name: tag) }.reject { |tag| (tag != self.name) && Network.exists?(name: tag) }
106106
end
107107
end
108108

0 commit comments

Comments
 (0)