Sha256: f132dd86301bd863550a4b67f6ceebfdeb597a2813046a64d91abeec17100835
Contents?: true
Size: 691 Bytes
Versions: 19
Compression:
Stored size: 691 Bytes
Contents
module Mongoid #:nodoc: module Associations #:nodoc: class BelongsToAssociation #:nodoc: include Decorator # Creates the new association by setting the internal # document as the passed in Document. This should be the # parent. # # All method calls on this object will then be delegated # to the internal document itself. def initialize(document) @document = document.parent decorate! end # Returns the parent document. The id param is present for # compatibility with rails, however this could be overwritten # in the future. def find(id) @document end end end end
Version data entries
19 entries across 19 versions & 1 rubygems