Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def show
- @posts = @group.posts.order(upd_at: :desc).includes(:user).includes(comments: :user).paginate(page: params[:page], per_page: 10)
- end
- <h1>Groupe <%= @group.name %></h1>
- <div class="post_list<%=@group.id%>">
- <%= render @posts %>
- </div>
- <%= will_paginate @posts, renderer: BootstrapPagination::Rails %>
- <% @comments = post.comments %>
- <ul id="comment_list<%=post.id%>">
- <%- if @comments.any? %>
- <%= render @comments, post: post %>
- <%= will_paginate @comments, renderer: BootstrapPagination::Rails %>
- <% end %>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement