Order in pagination


#1

@post_pages, @posts = paginate :posts, :per_page => 5, :order => ‘id’

The results are not ordered and I am not getting error and the results
not ordered in any order…is there any error in the syntax

??

Raj.


#2

maybe:

@post_pages, @posts = paginate :posts, :per_page => 5, :order => ‘id
desc’

or

@post_pages, @posts = paginate :posts, :per_page => 5, :order => ‘id
asc’


#3

no its not working…


#4

I fixed it


#5

Surely the :order should be in your find, not in your pagination?

On Jun 7, 11:55 am, “removed_email_address@domain.invalid” removed_email_address@domain.invalid


#6

How did u fix it?

On Jun 6, 6:25 pm, Ravindraraj M. <rails-mailing-l…@andreas-