Topic: newb: counting rows
I'm entirely new to Ruby and Rails. I'm not looking for code, but instead, I'm looking for guidelines to follow on how I should go about doing something.
I have my database with the table, posts. I'm trying to count how many "posts" are in the table where status="public"
So, how do I go about doing such a thing? I have a PHP background, so my mentality is still such.
I imagine I must define something in my model, call it in my controller, then output it in my view. But, I'm completely lost. I've tried searching, but the results just leave me even more confused.