Set micropost sort order
This commit is contained in:
parent
0a4bfa86f9
commit
e53f500e37
|
@ -5,7 +5,7 @@ class MicropostsController < ApplicationController
|
||||||
before_action :set_micropost, only: [:show]
|
before_action :set_micropost, only: [:show]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@microposts = Micropost.all
|
@microposts = Micropost.all.order(created_at: :desc)
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|
Loading…
Reference in New Issue