1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-04-11 01:02:34 +02:00
fab-manager/app/models/organization.rb
2020-03-25 12:35:09 +01:00

10 lines
287 B
Ruby

class Organization < ApplicationRecord
belongs_to :profile
belongs_to :invoicing_profile
has_one :address, as: :placeable, dependent: :destroy
accepts_nested_attributes_for :address, allow_destroy: true
validates :name, presence: true
validates :address, presence: true
end