organization.rb 592 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
  2. class Organization < ApplicationModel
  3. load 'organization/assets.rb'
  4. include Organization::Assets
  5. extend Organization::Search
  6. include Organization::SearchIndex
  7. has_and_belongs_to_many :users
  8. has_many :members, :class_name => 'User'
  9. validates :name, :presence => true
  10. after_create :notify_clients_after_create
  11. after_update :notify_clients_after_update
  12. activity_stream_support :role => 'Admin'
  13. history_support
  14. search_index_support
  15. end