Variable not defined after step 10


Hi All,

My Posts controller has this code:
class PostsController < ApplicationController
def index
@new_post =
@all_posts = Post.order(created_at::desc).all

I get an error saying :
NameError in PostsController#index
undefined local variable or method `created_at' for #

Presumably i need to create this created_at variable, but i do not see any hint about it in the previous steps



Again, solved :slightly_smiling:instead of @all_posts = Post.order(created_at::desc).all
it should be @all_posts = Post.order(created_at: :desc).all missing a space