Please read for an updated status on RailsCasts:
Learn more or hide this
GitHub User: Debadatta
I have a products table with server side response.
But I am getting issue with sorting for comments_count. Because comments_count is not a field in products table .
I am getting PGSql error for undefined column comments_count.
But comments_count is the total number of counts for each product record.
columns = %w[name created_at user_id id category_name comments_count]
How can I solve to order by comments_count ?