应用列表分页功能
This commit is contained in:
parent
db2d2e9b24
commit
dbe4c26322
|
@ -7,8 +7,9 @@ class SoftapplicationsController < ApplicationController
|
||||||
# GET /softapplications.json
|
# GET /softapplications.json
|
||||||
def index
|
def index
|
||||||
@softapplications = Softapplication.all
|
@softapplications = Softapplication.all
|
||||||
|
|
||||||
|
#new added fenyefunction
|
||||||
@limit = 5
|
@limit = 5
|
||||||
#new added
|
|
||||||
@softapplication_count = @softapplications.count
|
@softapplication_count = @softapplications.count
|
||||||
@softapplication_pages = Paginator.new @softapplication_count, @limit, params['page']
|
@softapplication_pages = Paginator.new @softapplication_count, @limit, params['page']
|
||||||
@offset ||= @softapplication_pages.offset
|
@offset ||= @softapplication_pages.offset
|
||||||
|
|
Loading…
Reference in New Issue