Sha256: 0ddefa1d80de0591dad9cc5bb5c14c83b206ab6069b4ef92c3526a99b6bb1ddc
Contents?: true
Size: 281 Bytes
Versions: 6
Compression:
Stored size: 281 Bytes
Contents
module ActiveMocker module Mock class HasOne < SingleRelation attr_reader :item def initialize(item, child_self:, foreign_key:) item.send(:write_attribute, foreign_key, item.try(:id)) if !item.try(:id).nil? super end end end end
Version data entries
6 entries across 6 versions & 1 rubygems