Method: Mongoid::Association::Relatable#inverse_type_setter

Defined in:
lib/mongoid/association/relatable.rb

#inverse_type_setterString

Gets the setter for the field that sets the type of document on a polymorphic association.

Examples:

Get the inverse type setter.

association.inverse_type_setter

Returns:

  • (String)

    The name of the setter.



235
236
237
# File 'lib/mongoid/association/relatable.rb', line 235

def inverse_type_setter
  @inverse_type_setter ||= "#{inverse_type}=" if inverse_type
end