Module: ROM::Types::Methods
- Defined in:
- core/lib/rom/types.rb
Overview
Type extensions
Instance Method Summary collapse
-
#ForeignKey(relation, type = Types::Integer) ⇒ Dry::Types::Nominal
Shortcut for defining a foreign key attribute type.
Instance Method Details
#ForeignKey(relation, type = Types::Integer) ⇒ Dry::Types::Nominal
Shortcut for defining a foreign key attribute type
33 34 35 |
# File 'core/lib/rom/types.rb', line 33 def ForeignKey(relation, type = Types::Integer) type.(foreign_key: true, target: relation) end |