display the question count for each subject next to the subject name:
@subjects = Subject.order(:title)
@question_number = Question.find(???).count
<a href="/.../<%= subject.id %>"><%= subject.title %> (<%=
The questions table has a subject_id attribute and this is what I want
to query on
Can't understand how to find the count for each subject in the @subjects
hash and then display with the associated subject
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit https://groups.google.com/groups/opt_out.