-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
Having a bit of trouble.
class Item include Mongoid::Document embedded_in :report end class Report include Mongoid::Document embeds_many :items after_initialize do |report| report.items = [Item.new, Item.new] end end
NoMethodError (undefined method `find' for nil:NilClass): app/models/report.rb:14:in `block in <class:Report>' app/controllers/reports_controller.rb:6:in `new'
Is there anything I did wrong?
Thanks again. You guys are awesome.