diff --git a/FireResponse/app/controllers/tables_controller.rb b/FireResponse/app/controllers/tables_controller.rb index e312b1f..57c5b0d 100644 --- a/FireResponse/app/controllers/tables_controller.rb +++ b/FireResponse/app/controllers/tables_controller.rb @@ -22,4 +22,8 @@ class TablesController < ApplicationController def shelters render json: Shelters.all.to_json end + + def volunteering + render json: Volunteering.all.to_json + end end diff --git a/FireResponse/app/models/volunteering.rb b/FireResponse/app/models/volunteering.rb new file mode 100644 index 0000000..45fde14 --- /dev/null +++ b/FireResponse/app/models/volunteering.rb @@ -0,0 +1,4 @@ +class Volunteering < Airrecord::Table + self.base_key = "appsj7gOti4YuE2v1" + self.table_name = "Volunteering" +end diff --git a/FireResponse/config/routes.rb b/FireResponse/config/routes.rb index ae06d5f..c4bb01a 100644 --- a/FireResponse/config/routes.rb +++ b/FireResponse/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do - ['recent_news', 'resources', 'support_services', 'gas_stations', 'markets', 'shelters'].each do |x| + ['recent_news', 'resources', 'support_services', 'gas_stations', 'markets', 'shelters', 'volunteering'].each do |x| get "/#{x}", to: "tables##{x}" end end