1
0
mirror of https://github.com/danbee/tube-status-server synced 2025-03-04 08:39:12 +00:00

Tweak ID's.

This commit is contained in:
Daniel Barber 2015-03-06 16:04:07 +00:00
parent bb6e6612dc
commit ce024aa062

View File

@ -23,7 +23,7 @@ class Tubestatus < Sinatra::Base
# Parse the XML into the appropriate structure for our app.
data = feed_data["LineStatus"].map do |line|
{ :id => line["Line"].first["Name"].downcase.gsub(/ (and)?/, ""),
{ :id => line["Line"].first["Name"].downcase.gsub(/[^a-z]+/, "-"),
:name => line["Line"].first["Name"],
:status => line["Status"].first["Description"].downcase,
:messages => line["StatusDetails"].empty? ? [] : [line["StatusDetails"]] }