fix article pagination
This commit is contained in:
parent
952aecfb40
commit
81ba5ab20e
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue