Only show changesets that are actually closed in the index view.
This commit is contained in:
parent
d6a1ccf6b4
commit
8fe53e4823
2 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ class BrowseController < ApplicationController
|
|||
end
|
||||
|
||||
def index
|
||||
@changesets = Changeset.find(:all, :order => "closed_at DESC", :limit=> 20)
|
||||
@changesets = Changeset.find(:all, :order => "closed_at DESC", :conditions => ['closed_at < ?', DateTime.now], :limit=> 20)
|
||||
end
|
||||
|
||||
def relation
|
||||
|
|
|
@ -20,7 +20,7 @@ class BrowseControllerTest < ActionController::TestCase
|
|||
|
||||
# This should display the last 20 changesets closed.
|
||||
def test_index
|
||||
@changesets = Changeset.find(:all, :order => "closed_at DESC", :limit=> 20)
|
||||
@changesets = Changeset.find(:all, :order => "closed_at DESC", :conditions => ['closed_at < ?', DateTime.now], :limit=> 20)
|
||||
assert @changesets.size <= 20
|
||||
get :index
|
||||
assert_response :success
|
||||
|
|
Loading…
Add table
Reference in a new issue