Missing logic for update_rank method in post.rb