Hi there,
I’m working on my first real rails application (meaning not one out of
a book), and I’m not quite sure how to display the results of a
grouped query. This is what I have in my controller:
@s = Story.find_recent_public_stories
@stories = @s.group_by {|story| story.section}
In my for loop, I’ve tried various combinations of things like
@stories.section.name, but so far, I haven’t had any luck.
@stories.to_xml and @stories.to_yaml works fine, though. Everything
else returns a NoMethodError.
My ultimate goal is to get a list of stories sorted by category.
Thanks!