Created
November 7, 2011 07:42
-
-
Save Solnse/1344406 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FoodItem < ActiveRecord::Base | |
has_many :menus, :through => :food_item_menus | |
has_many :food_item_menus | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NoMethodError in Food_item_menus#index
Showing /home/chad/sites/mavericksaloon/app/views/food_item_menus/index.html.haml where line #5 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.each
Extracted source (around line #5):
2:
3: %h1 Listing food_item_menus
4:
5: = @food_list.each do |category, food_items|
6: %p
7: = category
8: %ul
Rails.root: /home/chad/sites/mavericksaloon
Application Trace | Framework Trace | Full Trace
app/views/food_item_menus/index.html.haml:5:in `_app_views_food_item_menus_index_html_haml___604926228_99384720'
Request
Parameters: