Sha256: 190d1aca62a5751f098f957b0289f6537c9b30a092739227966df236b31132ab

Contents?: true

Size: 733 Bytes

Versions: 4

Compression:

Stored size: 733 Bytes

Contents

class ControlSystem < ActiveRecord::Base
	has_many :devices,	:class_name => "ControllerDevice",		:order => 'priority ASC',	:dependent => :destroy
	has_many :logics,	:class_name => "ControllerLogic",		:order => 'priority ASC',	:dependent => :destroy
	has_many :services,	:class_name => "ControllerHttpService",	:order => 'priority ASC',	:dependent => :destroy
	
	has_many :controller_zones,		:dependent => :destroy
	has_many :zones,				:through => :controller_zones
	has_many :user_zones,			:through => :zones
	has_many :groups,				:through => :user_zones
	has_many :users,				:through => :groups
	
	has_many :trusted_devices,		:dependent => :destroy
	
	
	protected
	
	
	validates_presence_of :name
	validates_uniqueness_of :name
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
automate-em-0.0.4 app/models/control_system.rb
automate-em-0.0.3 app/models/control_system.rb
automate-em-0.0.2 app/models/control_system.rb
automate-em-0.0.1 app/models/control_system.rb