Skip to content

Commit

Permalink
The story that revoted should be on the top of the ungroomed list
Browse files Browse the repository at this point in the history
  • Loading branch information
hlcfan committed Nov 30, 2016
1 parent 0678a5c commit 3d6ac98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/room.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def display_state
end

def grouped_stories
stories_grouped = stories.group_by do |story|
stories_grouped = desc_sorted_stories.group_by do |story|
story.point.present?
end

Expand Down Expand Up @@ -79,6 +79,10 @@ def timer_interval

private

def desc_sorted_stories
stories.order("updated_at DESC")

This comment has been minimized.

Copy link
@hlcfan

hlcfan Feb 18, 2017

Author Owner

For re-voted story, it should be sorted DESC, but for newly added story, it shouldnt be sorted. #82

end

def has_timer?
!!timer
end
Expand Down

0 comments on commit 3d6ac98

Please sign in to comment.