I'm building what I thought was a fairly simple recipe app while learning RoR.
I've got a table for users, and a table for recipes, and a recipe_users table where a user is saving a list of recipes.
The error I'm getting from rails is "uninitialized constant User::RecipeUser"
My Models are as follows
class User < ActiveRecord::Base acts_as_authentic has_many :recipe_users has_many :recipes, :through = > :recipe_users end class Recipes < ActiveRecord::Base has_many :ingredients, :dependent => :destroy has_many :recipe_users has_many :users, :through => :recipe_users end class RecipeUsers < ActiveRecord::Base belongs_to :user belongs_to :recipe end
now in my users controller, I am attempting to call
@user = User.find(current_user.id) @userRecipes = @user.recipes.find()
looking at my mysql Show Tables, I get
recipe_users recipes schema_migrations user_sessions users
so as far as I can tell, I've got the naming conventions right.
Any suggestions as to why I'm getting this error?