From 35b17d8c4f87d8db1cc02e84e87b8e968af0ce88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Mon, 10 Feb 2014 01:14:20 +0100 Subject: [PATCH] Do not call self-modifying Enumerable methods on AR::Relation objects --- app/controllers/tags_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 44f44239c..9cea03112 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -57,9 +57,9 @@ class TagsController < ApplicationController end def prep_tags_for_javascript - @tags.map! do |tag| + @tags = @tags.map {|tag| { :name => ("#" + tag.name) } - end + } @tags << { :name => ('#' + params[:q]) } @tags.uniq!