fix article pagination

new_user
JuliusR 8 months ago
parent 952aecfb40
commit 81ba5ab20e
  1. 4
      app/controllers/articles_controller.rb

@ -15,11 +15,11 @@ class ArticlesController < ApplicationController
elsif params[:order]
case params[:order]
when 'updated_on'
@articles = @supplier.articles.paginate :all, :order => "updated_on DESC", :page => params[:page]
@articles = @supplier.articles.all.page(params[:page]).order(updated_on: :desc)
@updated_on = true
end
else
@articles = @supplier.articles.paginate :page => params[:page]
@articles = @supplier.articles.page(params[:page])
end
respond_to do |format|

Loading…
Cancel
Save