N
N
nnobodyss abel2017-03-16 03:03:08
Blogs
nnobodyss abel, 2017-03-16 03:03:08

Display posts by rails date?

How to make new posts appear at the top?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Demidenko, 2017-03-16
@Dem1

Post.order(created_at: :desc)

I
Infinite, 2017-03-16
@Infinite

Either in the Model default_scope -> { order('created_at DESC') }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question