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



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

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

#from_toObject



32
33
34
35
36
# File 'app/controllers/gtfs_engine/transfers_controller.rb', line 32

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

#toObject



27
28
29
30
# File 'app/controllers/gtfs_engine/transfers_controller.rb', line 27

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