The posts are re-sorted into descending order by posting date. Then the
10 latest are displayed, which is how it should be.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/users/show.html.erb | 3 ++-
doc/ChangeLog | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 40be67f..f15189c 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -48,7 +48,8 @@
<% if @this_user.posts.empty? %>
<tr class="odd"><td><b>This user has posted no
messages.</b></td></tr>
<% else %>
- <% @this_user.posts.slice(0..9).each do |post| %>
+ <% posts = @this_user.posts.sort { |first, second| second.posted <=>
first.posted }
+ posts.slice(0..9).each do |post| %>
<tr class="<%= cycle('odd', 'even') %>">
<td><%= link_to
"#{get_first_sentence(RedCloth.new(post.body).to_html) }", message_path(post)
%></td>
</tr>
diff --git a/doc/ChangeLog b/doc/ChangeLog
index fe54823..070818c 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -60,6 +60,7 @@ Change Log (0.3.0):
* #230 - Sprint not started but no error message is shown. (BUG)
* #231 - Fix the breadcrumb trail for the task page. (BUG)
* #234 - Fix the URL for user registration. (BUG)
+ * #235 - Recent activity is actually oldest activity. (BUG)
Change Log (0.2.0):
* #97 - Users can request new projects.
--
1.6.2.5
Show replies by date