Class: Chouette::Network
- Inherits:
-
TridentActiveRecord
- Object
- ActiveRecord::Base
- ActiveRecord
- TridentActiveRecord
- Chouette::Network
- Defined in:
- app/models/chouette/network.rb
Class Method Summary collapse
- .nullable_attributes ⇒ Object
-
.object_id_key ⇒ Object
attr_accessible :objectid, :object_version, :creation_time, :creator_id, :version_date, :description, :name attr_accessible :registration_number, :source_name, :source_type, :source_identifier, :comment.
Instance Method Summary collapse
Methods inherited from TridentActiveRecord
#build_objectid, #clean_object_id, #default_values, #fix_uniq_objectid, model_name, #objectid, #objectid_format_compliance, #prefix, #prepare_auto_columns, #reset_auto_columns, #timestamp_attributes_for_create, #timestamp_attributes_for_update, #uniq_objectid
Methods inherited from ActiveRecord
#human_attribute_name, #nil_if_blank
Class Method Details
.nullable_attributes ⇒ Object
20 21 22 |
# File 'app/models/chouette/network.rb', line 20 def self.nullable_attributes [:source_name, :source_type, :source_identifier, :comment] end |
.object_id_key ⇒ Object
attr_accessible :objectid, :object_version, :creation_time, :creator_id, :version_date, :description, :name attr_accessible :registration_number, :source_name, :source_type, :source_identifier, :comment
16 17 18 |
# File 'app/models/chouette/network.rb', line 16 def self.object_id_key "GroupOfLine" end |
Instance Method Details
#commercial_stop_areas ⇒ Object
24 25 26 |
# File 'app/models/chouette/network.rb', line 24 def commercial_stop_areas Chouette::StopArea.joins(:children => [:stop_points => [:route => [:line => :network] ] ]).where(:networks => {:id => self.id}).uniq end |
#stop_areas ⇒ Object
28 29 30 |
# File 'app/models/chouette/network.rb', line 28 def stop_areas Chouette::StopArea.joins(:stop_points => [:route => [:line => :network] ]).where(:networks => {:id => self.id}) end |