paginate blog comments; fix length/site on AR objects
This commit is contained in:
@@ -17,9 +17,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="comments">
|
||||
<h3><%= "#{pluralize(@post.comments.length, 'comment')}." %></h3>
|
||||
<% @post.comments.each do |c| %>
|
||||
<h3><%= "#{pluralize(@post.comments.size, 'comment')}." %></h3>
|
||||
<% @comments.each do |c| %>
|
||||
<%= render "comments/comment", c: c %>
|
||||
<% end %>
|
||||
<%= paginate @comments %>
|
||||
<%= render "comments/new" %>
|
||||
</div>
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="replies">
|
||||
<h3><%= "#{pluralize(@thread.replies.length, 'reply')}." %></h3>
|
||||
<h3><%= "#{pluralize(@thread.replies.size, 'reply')}." %></h3>
|
||||
<% @replies.each do |reply| %>
|
||||
<%= render partial: "threadreplies/reply", locals: {reply: reply} %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% users = User.seen(2.minutes) %>
|
||||
<div id="footer">
|
||||
<div id="online-users">
|
||||
<p>Users seen within the last two minutes: <%= users.length %></p>
|
||||
<p>Users seen within the last two minutes: <%= users.size %></p>
|
||||
<% users.each do |u| %>
|
||||
<%= render partial: "users/username", locals: { user: u } %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user