I'm trying to use RABL to build JSON output for the following index.html.erb file:
<% @halls.each do |hall| %>
<%= hall.name.capitalize %><br><br>
<% hall.days.each do |day| %>
<%= day.date.capitalize %>
<br><br>
<% day.meals.each do |meal| %>
<%= meal.name.capitalize %><br><br>
<% meal.foods.each do |food| %>
<%= food.name %> <br>
<% end %>
<br>
<% end %>
<% end %>
<% end %>
At this point, I've tried it a million different ways, and I was hoping someone could help me generate the code for the index.json.rabl file, as I'm completely and utterly stuck.