module PlaceOS::Model::Associations

Direct including types

Defined in:

placeos-models/base/associations.cr

Class Method Summary

Macro Summary

Instance Method Summary

Class Method Detail

def self.format_list_for_postgres(list : Enumerable(String)) : String #

Macro Detail

macro 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


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

Must be used in conjunction with the belongs_to macro


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

Instance Method Detail

def format_list_for_postgres(list : Enumerable(String)) : String #

def reset_associations #