/favorites: replace favorites view with ordfav: search.

Make /favorites redirect to a ordfav:<user> search instead of having a
separate view just for favorites. This duplicated a lot of code for no
good reason.
This commit is contained in:
evazion
2019-08-31 19:58:38 -05:00
parent 7f7730d249
commit b77eebf136
8 changed files with 19 additions and 249 deletions

View File

@@ -14,7 +14,7 @@
<% if presenter.has_favorites? %>
<div class="box user-favorites">
<h2>
<%= link_to "Favorites", favorites_path(:user_id => user.id) %>
<%= link_to "Favorites", posts_path(tags: "ordfav:#{user.name}") %>
</h2>
<div>
<% presenter.favorites.each do |post| %>
@@ -39,4 +39,4 @@
</div>
</div>
<% end %>
<% end %>
<% end %>