app/controllers/pulitzer/posts_controller.rb in pulitzer-0.5.5 vs app/controllers/pulitzer/posts_controller.rb in pulitzer-0.5.6
- old
+ new
@@ -2,10 +2,10 @@
before_filter :get_post, only: [:show, :edit, :edit_slug, :update,
:update_slug, :processing_preview]
def index
@post_type = Pulitzer::PostType.find params[:post_type_id]
- @posts = Pulitzer::Post.where post_type: @post_type
+ @posts = Pulitzer::Post.where(post_type: @post_type).order(id: :desc)
end
def new
@post = Pulitzer::Post.new(post_type_id: params[:post_type_id])
render partial: 'new', locals: { post: @post }