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:
parent
bb6e6612dc
commit
ce024aa062
@ -23,7 +23,7 @@ class Tubestatus < Sinatra::Base
|
|||||||
|
|
||||||
# Parse the XML into the appropriate structure for our app.
|
# Parse the XML into the appropriate structure for our app.
|
||||||
data = feed_data["LineStatus"].map do |line|
|
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"],
|
:name => line["Line"].first["Name"],
|
||||||
:status => line["Status"].first["Description"].downcase,
|
:status => line["Status"].first["Description"].downcase,
|
||||||
:messages => line["StatusDetails"].empty? ? [] : [line["StatusDetails"]] }
|
:messages => line["StatusDetails"].empty? ? [] : [line["StatusDetails"]] }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user