class PostsController < ApplicationController
  def index
    @posts = Post.order("points DESC, created_at DESC")
  end
end

class PostsController < ApplicationController
  def index
    @posts = Post.where(created_at: (24.hours.ago..Time.now)).order("points DESC, created_at DESC")
  end
end

Add where constraint to posts retrieval
Add where constraint to posts retrieval
