Skip to content

Instantly share code, notes, and snippets.

@bgvo
Created January 15, 2015 17:48
Show Gist options
  • Save bgvo/443a2ce15dc34b8f6f50 to your computer and use it in GitHub Desktop.
Save bgvo/443a2ce15dc34b8f6f50 to your computer and use it in GitHub Desktop.
has_many association not working
class User
include Mongoid::Document
has_many :wishlists, class_name: "Item"
end
In rails s:
>> u = User.first
>> u.wishlists.push(Item.first)
>> TypeError: nil is not a symbol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment