Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop
This commit is contained in:
commit
d0209490c6
app/controllers/api/v1
|
@ -23,7 +23,7 @@ class Api::V1::BaseController < ApplicationController
|
|||
|
||||
def kaminary_select_paginate(relation)
|
||||
limit = params[:limit] || params[:per_page]
|
||||
limit = (limit.to_i.zero? || limit.to_i > 100) ? 100 : limit.to_i
|
||||
limit = (limit.to_i.zero? || limit.to_i > 200) ? 200 : limit.to_i
|
||||
page = params[:page].to_i.zero? ? 1 : params[:page].to_i
|
||||
|
||||
relation.page(page).per(limit)
|
||||
|
|
|
@ -10,7 +10,7 @@ class Api::V1::Issues::JournalsController < Api::V1::BaseController
|
|||
@total_journals_count = @object_result[:total_journals_count]
|
||||
@total_operate_journals_count = @object_result[:total_operate_journals_count]
|
||||
@total_comment_journals_count = @object_result[:total_comment_journals_count]
|
||||
@journals = kaminari_paginate(@object_result[:data])
|
||||
@journals = kaminary_select_paginate(@object_result[:data])
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
Loading…
Reference in New Issue