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 #

[View source]

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


[View source]
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


[View source]
macro has_one(child_class, dependent = :none, association_name = nil, presence = false) #

[View source]

Instance Method Detail

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

[View source]
def reset_associations #

[View source]