diff options
Diffstat (limited to 'app/models/chouette/access_link.rb')
| -rw-r--r-- | app/models/chouette/access_link.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/chouette/access_link.rb b/app/models/chouette/access_link.rb index 46fbcb631..4b99ab5ba 100644 --- a/app/models/chouette/access_link.rb +++ b/app/models/chouette/access_link.rb @@ -1,5 +1,6 @@ module Chouette class AccessLink < Chouette::TridentActiveRecord + has_paper_trail include ObjectidSupport # FIXME http://jira.codehaus.org/browse/JRUBY-6358 self.primary_key = "id" @@ -50,11 +51,11 @@ module Chouette def link_key Chouette::AccessLink.build_link_key(access_point,stop_area,link_orientation_type) end - + def self.build_link_key(access_point,stop_area,link_orientation_type) if link_orientation_type == "access_point_to_stop_area" "A_#{access_point.id}-S_#{stop_area.id}" - else + else "S_#{stop_area.id}-A_#{access_point.id}" end end @@ -63,4 +64,4 @@ module Chouette Chouette::Geometry::AccessLinkPresenter.new self end end -end
\ No newline at end of file +end |
