5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 03:51:42 +00:00

deshabilitar el paginado temporalmente

no permite mover posts entre paginas!
This commit is contained in:
f 2021-10-21 14:40:55 -03:00
parent 69ef571bdb
commit 9c4a0a86f3
2 changed files with 2 additions and 4 deletions

View file

@ -25,7 +25,7 @@ class PostsController < ApplicationController
return unless stale?([current_usuarie, site, filter_params])
# Todos los artículos de este sitio para el idioma actual
@posts = site.indexed_posts.where(locale: locale).page(filter_params.delete(:page))
@posts = site.indexed_posts.where(locale: locale)
# De este tipo
@posts = @posts.where(layout: filter_params[:layout]) if filter_params[:layout]
# Que estén dentro de la categoría
@ -154,7 +154,7 @@ class PostsController < ApplicationController
#
# @return [Hash]
def filter_params
@filter_params ||= params.permit(:q, :category, :layout, :page).to_hash.select do |_, v|
@filter_params ||= params.permit(:q, :category, :layout).to_hash.select do |_, v|
v.present?
end.transform_keys(&:to_sym)
end

View file

@ -84,8 +84,6 @@
%button.btn{ data: { action: 'reorder#bottom' } }= t('posts.reorder.bottom')
%div
= link_to_prev_page @posts, t('posts.prev'), class: 'btn'
= link_to_next_page @posts, t('posts.next'), class: 'btn'
%tbody
- dir = t("locales.#{@locale}.dir")
- size = @posts.size