I have a repeat in show-page

<repeat with="&@comments"/><a/>

It works but as soon as I add group by

<repeat with="&@comments.group_by(&:job_post)"/><a/>

it fails with the error:


NoMethodError in Job_posts#show

Showing /Users/bilal/rails_projects/interns_partners/app/views/
job_posts/show.dryml where line #8 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.group_by
Extracted source (around line #8):

5:
6:      <collection:>
7:
8:                      <repeat 
with="&@comments.group_by(&:job_post_id)"/><a/><br/>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to