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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -