Class: Chouette::Line
- Inherits:
-
TridentActiveRecord
- Object
- ActiveRecord::Base
- ActiveRecord
- TridentActiveRecord
- Chouette::Line
- Defined in:
- app/models/chouette/line.rb
Constant Summary collapse
- @@transport_modes =
nil
Instance Attribute Summary collapse
-
#group_of_line_tokens ⇒ Object
attr_accessible :group_of_lines, :group_of_line_ids, :group_of_line_tokens attr_accessible :url, :color, :text_color.
-
#transport_mode ⇒ Object
Returns the value of attribute transport_mode.
Class Method Summary collapse
Instance Method Summary collapse
- #commercial_stop_areas ⇒ Object
- #geometry_presenter ⇒ Object
- #stop_areas ⇒ Object
- #stop_areas_last_parents ⇒ Object
Methods inherited from TridentActiveRecord
#build_objectid, #clean_object_id, #default_values, #fix_uniq_objectid, model_name, object_id_key, #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
Instance Attribute Details
#group_of_line_tokens ⇒ Object
attr_accessible :group_of_lines, :group_of_line_ids, :group_of_line_tokens attr_accessible :url, :color, :text_color
26 27 28 |
# File 'app/models/chouette/line.rb', line 26 def group_of_line_tokens @group_of_line_tokens end |
#transport_mode ⇒ Object
Returns the value of attribute transport_mode.
27 28 29 |
# File 'app/models/chouette/line.rb', line 27 def transport_mode @transport_mode end |
Class Method Details
.nullable_attributes ⇒ Object
40 41 42 |
# File 'app/models/chouette/line.rb', line 40 def self.nullable_attributes [:published_name, :number, :comment, :url, :color, :text_color] end |
.transport_modes ⇒ Object
58 59 60 61 62 |
# File 'app/models/chouette/line.rb', line 58 def self.transport_modes @@transport_modes ||= Chouette::TransportMode.all.select do |transport_mode| transport_mode.to_i > 0 end end |
Instance Method Details
#commercial_stop_areas ⇒ Object
64 65 66 |
# File 'app/models/chouette/line.rb', line 64 def commercial_stop_areas Chouette::StopArea.joins(:children => [:stop_points => [:route => :line] ]).where(:lines => {:id => self.id}).uniq end |
#geometry_presenter ⇒ Object
44 45 46 |
# File 'app/models/chouette/line.rb', line 44 def geometry_presenter Chouette::Geometry::LinePresenter.new self end |