Answer the question
In order to leave comments, you need to log in
How to make such a condition?
Hello friends.
Please advise how to implement something similar.
There is a sample
Post
.order(created_at: :desc)
.limit(10)
Answer the question
In order to leave comments, you need to log in
posts = Post.order(created_at: :desc).limit(10)
posts.size - posts.where(ff_id: 2).size
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question