aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/access_points_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/access_points_helper.rb')
-rw-r--r--app/helpers/access_points_helper.rb30
1 files changed, 8 insertions, 22 deletions
diff --git a/app/helpers/access_points_helper.rb b/app/helpers/access_points_helper.rb
index c5e9f672e..c954e6cad 100644
--- a/app/helpers/access_points_helper.rb
+++ b/app/helpers/access_points_helper.rb
@@ -1,28 +1,14 @@
module AccessPointsHelper
- def access_links_pairs(access_links)
- hpairs = Hash.new
- pairs = Array.new
- access_links.each do |link|
- key = pair_key(link)
- pair = nil
- if (hpairs.has_key? key)
- pair = hpairs[key]
- else
- pair = AccessLinkPair.new
- pairs << pair
- hpairs[key] = pair
- end
- if (link.link_orientation_type == "access_point_to_stop_area")
- pair.from_access_point = link
- else
- pair.to_access_point = link
- end
- end
- pairs
+
+
+ def access_point_type_label_pairs
+ Chouette::AccessPoint
+ .access_point_types
+ .zip_map { |access_point_type| t("access_types.label.#{access_point_type}") }
end
-
+
def pair_key(access_link)
"#{access_link.access_point.id}-#{access_link.stop_area.id}"
end
-
+
end