Class: Chouette::StopPoint
- Inherits:
-
TridentActiveRecord
- Object
- ActiveRecord::Base
- ActiveRecord
- TridentActiveRecord
- Chouette::StopPoint
- Includes:
- ForAlightingEnumerations, ForBoardingEnumerations
- Defined in:
- app/models/chouette/stop_point.rb
Class Method Summary collapse
Instance Method Summary collapse
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, nullable_attributes
Class Method Details
Instance Method Details
#remove_dependent_journey_pattern_stop_points ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/models/chouette/stop_point.rb', line 24 def remove_dependent_journey_pattern_stop_points route.journey_patterns.each do |jp| if jp.stop_point_ids.include?( id) jp.stop_point_ids = jp.stop_point_ids - [id] end end end |
#stop_area_id_validation ⇒ Object
32 33 34 35 36 |
# File 'app/models/chouette/stop_point.rb', line 32 def stop_area_id_validation if stop_area_id.nil? errors.add(:stop_area_id, I18n.t("errors.messages.empty")) end end |