/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

@@ -7,7 +7,7 @@
<%= subnav_link_to "Recommended", recommended_posts_path(context: "user") %>
<% end %>
<% unless CurrentUser.is_anonymous? %>
<%= subnav_link_to "Favorites", favorites_path %>
<%= subnav_link_to "Favorites", posts_path(tags: "ordfav:#{CurrentUser.user.name}") %>
<%= subnav_link_to "Fav groups", favorite_groups_path %>
<% if CurrentUser.has_saved_searches? %>
<%= subnav_link_to "Saved searches", posts_path(:tags => "search:all") %>