mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
9 lines
253 B
Ruby
9 lines
253 B
Ruby
module Legacy
|
|
class Contact < Db
|
|
self.table_name = :contact
|
|
belongs_to :object_registry, foreign_key: :id
|
|
belongs_to :object, foreign_key: :id
|
|
|
|
has_one :object_state, -> { where('valid_to IS NULL') }, foreign_key: :object_id
|
|
end
|
|
end
|