From 9e22feb83a3da713f32b9e3dd1085b9621c8fa5d Mon Sep 17 00:00:00 2001 From: pablogfb Date: Thu, 10 Mar 2016 16:38:56 +0100 Subject: [PATCH] fixes tags links through searches --- app/views/shared/_tags.html.erb | 2 +- spec/features/tags_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shared/_tags.html.erb b/app/views/shared/_tags.html.erb index a161a8228..55f4f2dc6 100644 --- a/app/views/shared/_tags.html.erb +++ b/app/views/shared/_tags.html.erb @@ -3,7 +3,7 @@ <% if taggable.tags.any? %> <% taggable.tag_list_with_limit(limit).each do |tag| %> - <%= link_to sanitize(tag.name), send("#{taggable.class.name.underscore.pluralize}_path", tag: tag.name) %> + <%= link_to sanitize(tag.name), send("#{taggable.class.name.underscore.pluralize}_path", search: tag.name) %> <% end %> <% if taggable.tags_count_out_of_limit(limit) > 0 %> diff --git a/spec/features/tags_spec.rb b/spec/features/tags_spec.rb index 0b95e1de4..a67f412a3 100644 --- a/spec/features/tags_spec.rb +++ b/spec/features/tags_spec.rb @@ -34,7 +34,7 @@ feature 'Tags' do expect(page).to_not have_content(debate4.title) end - visit debates_path(tag: 'salud') + visit debates_path(search: 'salud') within("#debates") do expect(page).to have_css('.debate', count: 2)