Ruby on Rails Sunday, July 31, 2011

I already have done that, like this:

def unfinished_items
   self.items.where("status = ?", false)

def finished_items
  self.items.where("status = ?", true)

So I can use the List.unfinished.... But how do I add it as attributes to the json output?

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment