Browse Source

Merge pull request 'Order posts in category correctly' (#47) from category-order into master

Reviewed-on: #47
master
stephen 2 weeks ago
parent
commit
5d7d475af1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/category_controller.rb

+ 1
- 1
app/controllers/category_controller.rb View File

@@ -11,7 +11,7 @@ class CategoryController < ApplicationController
render file: "#{Rails.root}/public/404.html" , status: :not_found
return
end
@posts = @cat.posts.where(is_draft: false).all
@posts = @cat.posts.where(is_draft: false).order(created_at: :desc).all
end

def manage


Loading…
Cancel
Save