Makes sense to me, and would probably break my fix, assuming you mean:

scope :ranked_by_comments_hash, -> { order(comments_count: :desc, subject: :asc) }