paginate info

This commit is contained in:
jomo
2014-09-22 06:05:07 +02:00
parent 7f8736a028
commit ae81a2f76d
2 changed files with 2 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ class InfoController < ApplicationController
before_filter :auth, except: [:index, :show]
def index
@info = Info.all.sort_by{|i| i.title}
@info = Info.order(:title).page(params[:page])
end
def show