Commit a162ef00465022200b7195d65ef78adb003e6371
Committed by
Nick Recobra
1 parent
d5995c47
Exists in
master
and in
1 other branch
Limit the deploys list to 10 and paginate
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
app/controllers/deploys_controller.rb
| @@ -17,7 +17,7 @@ class DeploysController < ApplicationController | @@ -17,7 +17,7 @@ class DeploysController < ApplicationController | ||
| 17 | def index | 17 | def index |
| 18 | app = current_user.apps.find(:conditions => {:name => params[:app_id]}).first | 18 | app = current_user.apps.find(:conditions => {:name => params[:app_id]}).first |
| 19 | 19 | ||
| 20 | - @deploys = app.deploys.order_by(:created_at.desc) | 20 | + @deploys = app.deploys.order_by(:created_at.desc).paginate(:page => params[:page], :per_page => 10) |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | end | 23 | end |
app/views/deploys/index.html.haml