I have a simple problem . I am not able to figure out the rails equivalent for this sql query:
select COUNT(description) from reports where user_id = current_user;
Actually I want to count the total no. of reports posted by a particular user when logged in his account and not the all reports posted by all users. I am also not able to figure out that how should I pass the user_id of the current user logged in so that I can get the required result. Please Help.