Sha256: ef244d4586e5211b47e5d8a84bc431b86e452f07d138debb94cc31f346624f58
Contents?: true
Size: 573 Bytes
Versions: 40
Compression:
Stored size: 573 Bytes
Contents
module ActiveRecord module Associations class AssociationProxy #:nodoc: def origin proxy_owner end def origin_attribute proxy_reflection.name end private def raise_on_type_mismatch(record) # Don't complain if the interface type of a polymorphic association doesn't exist klass = @reflection.klass rescue nil unless klass.nil? || record.is_a?(klass) raise ActiveRecord::AssociationTypeMismatch, "#{@reflection.klass} expected, got #{record.class}" end end end end end
Version data entries
40 entries across 40 versions & 1 rubygems