diff --git a/app/controllers/deploys_controller.rb b/app/controllers/deploys_controller.rb index 50b9bb6..4490a07 100644 --- a/app/controllers/deploys_controller.rb +++ b/app/controllers/deploys_controller.rb @@ -16,8 +16,8 @@ class DeploysController < ApplicationController app = App.find(params[:app_id]) raise Mongoid::Errors::DocumentNotFound.new(App, app.id) unless current_user.admin? || current_user.watching?(app) - @deploys = app.deploys.order_by(:created_at.desc). - paginate(:page => params[:page], :per_page => 10) + @deploys = Kaminari.paginate_array(app.deploys.order_by(:created_at.desc)). + page(params[:page]).per(10) @app = app end diff --git a/app/views/deploys/index.html.haml b/app/views/deploys/index.html.haml index ee38df9..d8ab313 100644 --- a/app/views/deploys/index.html.haml +++ b/app/views/deploys/index.html.haml @@ -3,5 +3,5 @@ - if current_user.authentication_token %span= link_to 'iCal', app_deploys_path(@app, :format => "ics", :auth_token => current_user.authentication_token), :class => "calendar_link" = render 'table', :deploys => @deploys -= will_paginate @deploys, :previous_label => '« Previous', :next_label => 'Next »' += paginate @deploys -- libgit2 0.21.2