Class: ForestAdminDatasourceToolkit::Schema::Relations::PolymorphicOneToManySchema
- Inherits:
-
ForestAdminDatasourceToolkit::Schema::RelationSchema
- Object
- ForestAdminDatasourceToolkit::Schema::RelationSchema
- ForestAdminDatasourceToolkit::Schema::Relations::PolymorphicOneToManySchema
- Defined in:
- lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_one_to_many_schema.rb
Instance Attribute Summary collapse
-
#origin_key ⇒ Object
Returns the value of attribute origin_key.
-
#origin_key_target ⇒ Object
readonly
Returns the value of attribute origin_key_target.
-
#origin_type_field ⇒ Object
readonly
Returns the value of attribute origin_type_field.
-
#origin_type_value ⇒ Object
Returns the value of attribute origin_type_value.
Attributes inherited from ForestAdminDatasourceToolkit::Schema::RelationSchema
Instance Method Summary collapse
-
#initialize(origin_key:, origin_key_target:, foreign_collection:, origin_type_field:, origin_type_value:) ⇒ PolymorphicOneToManySchema
constructor
A new instance of PolymorphicOneToManySchema.
Constructor Details
#initialize(origin_key:, origin_key_target:, foreign_collection:, origin_type_field:, origin_type_value:) ⇒ PolymorphicOneToManySchema
Returns a new instance of PolymorphicOneToManySchema.
8 9 10 11 12 13 14 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_one_to_many_schema.rb', line 8 def initialize(origin_key:, origin_key_target:, foreign_collection:, origin_type_field:, origin_type_value:) super(foreign_collection, 'PolymorphicOneToMany') @origin_key = origin_key @origin_key_target = origin_key_target @origin_type_field = origin_type_field @origin_type_value = origin_type_value end |
Instance Attribute Details
#origin_key ⇒ Object
Returns the value of attribute origin_key.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_one_to_many_schema.rb', line 5 def origin_key @origin_key end |
#origin_key_target ⇒ Object (readonly)
Returns the value of attribute origin_key_target.
6 7 8 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_one_to_many_schema.rb', line 6 def origin_key_target @origin_key_target end |
#origin_type_field ⇒ Object (readonly)
Returns the value of attribute origin_type_field.
6 7 8 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_one_to_many_schema.rb', line 6 def origin_type_field @origin_type_field end |
#origin_type_value ⇒ Object
Returns the value of attribute origin_type_value.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_one_to_many_schema.rb', line 5 def origin_type_value @origin_type_value end |