I have 2 models:
class Annotation
include Mongoid::Document
belongs_to :event
field :desc, type: String
end
class Event::Event
include Mongoid::Document
has_many :annotations
end
And then I created 2 objects in rails console by typing:
a = Annotation.new
e = Event::Event.new
Now everythings is good, but when I do
a.event = e
I get the following error:
NoMethodError: undefined method `relations' for Event:Module
Why is this error happening and how to fix it? Thanks.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)