Associations of Organizations
1.Customer
Every Organization belongs to a customer
belongs_to :customer
2.Organization type
Every Organization has a class (OrganizationType) type.
belongs_to :organization_type
class OrganizationType < ActiveRecord::Base
# All types that are available
scope :active, -> { where(:active => true) }
def to_s
name
end
end
3.Users
Every Organization can have a set of users
has_many :users
4.Messages
Every Organization can have messages
has_many :messages
5.Uploads
Every Organization can have set of uploads
has_many :uploads
6.Asset group
Every Organization can have 0 to more Asset groups
has_many :asset_groups
7.Vendors
Every organization can have 0 to more vendors
has_many :vendors