mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-30 11:24:21 +01:00
9 lines
256 B
Ruby
9 lines
256 B
Ruby
class Organization < ActiveRecord::Base
|
|
belongs_to :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
|