Hey,
*sorry for double post* So I keep getting "undefined method `each' for #<Definition: 0x28fa154>". The call that gets made returns 1 word object with 2 definition objects. I can verify both definition objects get returned with all there attributes because I can output data like this:
<% @word.definitions.each do |h| %> <p> <%=h h.definition %> </p> <p> <%=h h.id %> </p> <% end %>
But I'd like to not write out every definition attribute so I attempt to loop those as well like this:
<% @word.definitions.each do |h| %> <% h.each do |i| %> <p> <%=h h.i %> </p> <% end %> <% end %>
But get the above mentioned error. My guess is I'm getting a returned data type that is not an array? So I can't loop them the same way? Your suggestions would be very helpful, thanks.