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:
parent
69ef571bdb
commit
9c4a0a86f3
2 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue