fixes tags links through searches

This commit is contained in:
pablogfb
2016-03-10 16:38:56 +01:00
parent beddbd6e87
commit 9e22feb83a
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
<% if taggable.tags.any? %> <% if taggable.tags.any? %>
<span id="tags" class='tags'> <span id="tags" class='tags'>
<% taggable.tag_list_with_limit(limit).each do |tag| %> <% 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 %> <% end %>
<% if taggable.tags_count_out_of_limit(limit) > 0 %> <% if taggable.tags_count_out_of_limit(limit) > 0 %>

View File

@@ -34,7 +34,7 @@ feature 'Tags' do
expect(page).to_not have_content(debate4.title) expect(page).to_not have_content(debate4.title)
end end
visit debates_path(tag: 'salud') visit debates_path(search: 'salud')
within("#debates") do within("#debates") do
expect(page).to have_css('.debate', count: 2) expect(page).to have_css('.debate', count: 2)