-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
sorry, my english is pool,
development envirmonment is: ruby 2.2, rails 4.2, mongoid 4.0.2
Models are:
class Book
include Mongoid::Document
has_one :isdn
end
class Isdn
include Mongoid::Document
belongs_to :book
end
run below codes be throw error:
book = Book.new
isdn = Isdn.new
book.isdn = isdn
isdn.book = book
book.isdn = isdn
throw errror:
NoMethodError: undefined method {{substitute' for #<Isdn:0x00000005f78fc8> from /home/ben/.rvm/gems/ruby-2.2.0/gems/mongoid-4.0.2/lib/mongoid/relations/accessors.rb:231:in }}block (2 levels) in setter'
- is duplicated by
-
MONGOID-3671 "undefined method `substitute' on an instance of" for embedded docs
- Closed
-
MONGOID-3983 undefined method `substitute' for polymorphic object
- Closed
- is related to
-
MONGOID-3983 undefined method `substitute' for polymorphic object
- Closed