Testing value of each related model
- by Novapax
Does Ruby (or Rails) provide an easy way to accomplish the following:
if @author.articles.each(:published == true)
puts "all articles of this author are published"
end
I think the example speaks for itself.