Recommend posts on /posts/show based on voting patterns
This commit is contained in:
7
app/views/posts/partials/index/_similar.html.erb
Normal file
7
app/views/posts/partials/index/_similar.html.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="recent-posts">
|
||||
<p>You might also like:</p>
|
||||
|
||||
<div>
|
||||
<%= PostSets::Similar.new(post).presenter.post_previews_html(self) %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,6 +82,10 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if RecommenderService.available?(@post) %>
|
||||
<%= render "posts/partials/index/similar", post: @post %>
|
||||
<% end %>
|
||||
|
||||
<% if @post.presenter.has_nav_links?(self) %>
|
||||
<%= render "posts/partials/show/nav_links", :post => @post, :position => "bottom" %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user