module

PlaceOS::Model::Associations

Class methods

format_list_for_postgres(list : Enumerable(String)) : String
Source

Instance methods

format_list_for_postgres(list : Enumerable(String)) : String
Source
reset_associations
Source

Macros

belongs_to(parent_class, dependent = :none, association_name = nil, foreign_key = nil, presence = false, pk_type = nil, serialize = true)

Defines getter and setter for parent relationship

Source
has_many(child_class, collection_name = nil, dependent = :none, foreign_key = nil, serialize = false)

Must be used in conjunction with the belongs_to macro

Source
has_one(child_class, dependent = :none, association_name = nil, presence = false)
Source