Class: Alarm

Inherits:
Component show all
Defined in:
lib/app/models/alarm.rb

Instance Attribute Summary

Attributes inherited from Component

#component

Instance Method Summary collapse

Methods inherited from Component

#add_component, base_class, #belongs_to, class_of_active_record_descendant, #component_names, #components, compute_table_name, #reset_component, reset_table_name, #set_component, table_name, #to_ical, #trigger_parent_component

Instance Method Details

#owner_type=(sType) ⇒ Object

scope :events, where(“components.type == ‘Event’”) has_many :components, :as => :parent



6
7
8
# File 'lib/app/models/alarm.rb', line 6

def owner_type=(sType)
     super(sType.to_s.classify.constantize.base_class.to_s)
end