Class: GtfsEngine::TransfersController

Inherits:
ApplicationController show all
Includes:
Concerns::Controllers::Gtfs
Defined in:
app/controllers/gtfs_engine/transfers_controller.rb

Instance Method Summary collapse

Methods included from Concerns::Controllers::Gtfs

#filter, #index, #show

Methods included from Concerns::Controllers::DataAccess

#data, #data_cache, #param_is_data_set_name?

Instance Method Details

#fromObject



10
11
12
13
# File 'app/controllers/gtfs_engine/transfers_controller.rb', line 10

def from
  @transfers = collection.where(from_stop_id: params[:stop_id])
  respond_with(@transfers)
end

#from_toObject



20
21
22
23
24
# File 'app/controllers/gtfs_engine/transfers_controller.rb', line 20

def from_to
  @transfer = collection.find_by(from_stop_id: params[:from_id],
                                 to_stop_id: params[:to_id])
  respond_with(@transfer)
end

#toObject



15
16
17
18
# File 'app/controllers/gtfs_engine/transfers_controller.rb', line 15

def to
  @transfers = collection.where(to_stop_id: params[:stop_id])
  respond_with(@transfers)
end