aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/stop_point.rb
diff options
context:
space:
mode:
authorVlatka Pavisic2017-04-11 15:35:01 +0200
committerVlatka Pavisic2017-04-11 15:35:01 +0200
commitaa481c087b162bc775b4418e205f91c5b6bead19 (patch)
tree914ba9b39e0338317bcc2bfd839f745647beda1a /app/models/chouette/stop_point.rb
parent8adf909694b52959483818bf839d6e180015eb99 (diff)
downloadchouette-core-aa481c087b162bc775b4418e205f91c5b6bead19.tar.bz2
Refs #3047: Associate RoutingConstraintZone with StopPoints
Diffstat (limited to 'app/models/chouette/stop_point.rb')
-rw-r--r--app/models/chouette/stop_point.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/chouette/stop_point.rb b/app/models/chouette/stop_point.rb
index b77189fc1..96b79c9e7 100644
--- a/app/models/chouette/stop_point.rb
+++ b/app/models/chouette/stop_point.rb
@@ -2,7 +2,7 @@ module Chouette
class StopPoint < TridentActiveRecord
include ForBoardingEnumerations
include ForAlightingEnumerations
-
+
# FIXME http://jira.codehaus.org/browse/JRUBY-6358
self.primary_key = "id"
@@ -18,6 +18,8 @@ module Chouette
scope :default_order, order("position")
+ delegate :name, to: :stop_area
+
before_destroy :remove_dependent_journey_pattern_stop_points
def remove_dependent_journey_pattern_stop_points
route.journey_patterns.each do |jp|
@@ -25,7 +27,7 @@ module Chouette
jp.stop_point_ids = jp.stop_point_ids - [id]
end
end
- end
+ end
def stop_area_id_validation
if stop_area_id.nil?