ai tags: respect the user's posts-per-page setting on the /ai_tags page.
This commit is contained in:
@@ -4,12 +4,13 @@ class AITagsController < ApplicationController
|
||||
respond_to :js, :html, :json, :xml
|
||||
|
||||
def index
|
||||
@ai_tags = authorize AITag.visible(CurrentUser.user).paginated_search(params, count_pages: false)
|
||||
@ai_tags = @ai_tags.includes(:media_asset, :tag, :post) if request.format.html?
|
||||
|
||||
limit = params[:limit].presence || CurrentUser.user.per_page
|
||||
@mode = params.fetch(:mode, "gallery")
|
||||
@preview_size = params[:size].presence || cookies[:post_preview_size].presence || MediaAssetGalleryComponent::DEFAULT_SIZE
|
||||
|
||||
@ai_tags = authorize AITag.visible(CurrentUser.user).paginated_search(params, limit: limit, count_pages: false)
|
||||
@ai_tags = @ai_tags.includes(:media_asset, :tag, :post) if request.format.html?
|
||||
|
||||
respond_with(@ai_tags)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user