From 5a03f4b01fdd31a476b1db5cfb9bfae490282572 Mon Sep 17 00:00:00 2001 From: "Timothy N. Tsvetkov" Date: Thu, 28 Apr 2011 11:33:03 +0400 Subject: [PATCH] default paginattion --- app/controllers/repositories_controller.rb | 2 +- app/views/repositories/show.html.haml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 2e6316b7e..ec6f74398 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -4,7 +4,7 @@ class RepositoriesController < ApplicationController before_filter :find_repository, :only => [:show, :destroy] def show - @projects = @repository.projects.recent + @projects = @repository.projects.recent.paginate :page => params[:page], :per_page => 30 end def new diff --git a/app/views/repositories/show.html.haml b/app/views/repositories/show.html.haml index f9b67f063..9cf461b76 100644 --- a/app/views/repositories/show.html.haml +++ b/app/views/repositories/show.html.haml @@ -47,4 +47,6 @@ .actions-bar.wat-cf .actions + = will_paginate @projects + - content_for :sidebar, render(:partial => 'sidebar')