Jonathan Lake

Joined

1,840 Experience
18 Lessons Completed
0 Questions Solved

Activity

I'm dumb. In the storage.yaml file, '#amazon' also needs to be uncommented.

I'm getting KeyError in BlogPosts#index

'Missing configuration for the amazon Active Storage service. Configurations available for the test and local services.'

Posted in Adding Scheduled Blog Posts Discussion

My posts aren't displaying in the correct order. I have the following line in my blog_post.rb:

scope :sorted, -> { order(published_at: :desc, updated_at: :desc) }

And in my controller I have:

def index
@blog_posts = user_signed_in? ? BlogPost.sorted : BlogPost.published.sorted
end

The order seems to be the opposite of what shows in the video.

Posted in Adding Scheduled Blog Posts Discussion

The CSS for draft posts is working, but for some reason the CSS isn't being applied to scheduled posts.

Works:

Draft

Doesn't work:

Scheduled