what makes a model more advanced than just a simple ruby?

Use scope with argument

scope :waiting_for_approval, -> (user_id) { where(status: false, user_id: user_id) }

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top