ruby - How to create scope in my Rails 3 model to display all where the value = false? -
i added new field called "review" in column called "posts"
i want display posts review = false.
i trying add correct scope posts model this.
here's current scope have.
default_scope order: 'posts.created_at desc'
you create named scope:
scope :unreviewed, where(:review => false)
Comments
Post a Comment