Order in pagination

@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.

maybe:

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

or

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

no its not working…

I fixed it

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

On Jun 7, 11:55 am, “[email protected][email protected]

How did u fix it?

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs