Flowdock
method

raise_on_type_mismatch

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::AssociationProxy
raise_on_type_mismatch(record) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/association_proxy.rb, line 211
        def raise_on_type_mismatch(record)
          unless record.is_a?(@reflection.klass)
            message = "#{@reflection.class_name}(##{@reflection.klass.object_id}) expected, got #{record.class}(##{record.class.object_id})"
            raise ActiveRecord::AssociationTypeMismatch, message
          end
        end
Register or log in to add new notes.