I am new to Rails.
I have an ActiveRecord model called Post
. I'd like to get count of all the records of the Post
model. How can I accomplish this?
Thanks in advance for your help.
Post.count
is what you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With