Added airtable info
This commit is contained in:
parent
432653cdb4
commit
bc28417fff
|
@ -1,7 +1,4 @@
|
||||||
class RecentNewsController < ApplicationController
|
class RecentNewsController < ApplicationController
|
||||||
def index
|
|
||||||
render json: RecentNews.all.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
class TablesController < ApplicationController
|
||||||
|
def recent_news
|
||||||
|
render json: RecentNews.all.to_json
|
||||||
|
end
|
||||||
|
|
||||||
|
def resources
|
||||||
|
render json: Resources.all.to_json
|
||||||
|
end
|
||||||
|
|
||||||
|
def support_services
|
||||||
|
render json: SupportServices.all.to_json
|
||||||
|
end
|
||||||
|
|
||||||
|
def gas_stations
|
||||||
|
render json: GasStations.all.to_json
|
||||||
|
end
|
||||||
|
|
||||||
|
def markets
|
||||||
|
render json: Markets.all.to_json
|
||||||
|
end
|
||||||
|
|
||||||
|
def shelters
|
||||||
|
render json: Shelters.all.to_json
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
class GasStations < Airrecord::Table
|
||||||
|
self.base_key = "appsj7gOti4YuE2v1"
|
||||||
|
self.table_name = "Gas Stations"
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
class Markets < Airrecord::Table
|
||||||
|
self.base_key = "appsj7gOti4YuE2v1"
|
||||||
|
self.table_name = "Markets"
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
class Resources < Airrecord::Table
|
||||||
|
self.base_key = "appsj7gOti4YuE2v1"
|
||||||
|
self.table_name = "Resources"
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
class Shelters < Airrecord::Table
|
||||||
|
self.base_key = "appsj7gOti4YuE2v1"
|
||||||
|
self.table_name = "Shelters"
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
class SupportServices < Airrecord::Table
|
||||||
|
self.base_key = "appsj7gOti4YuE2v1"
|
||||||
|
self.table_name = "Support Services"
|
||||||
|
end
|
|
@ -1,5 +1,5 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
['recent_news', 'resources', 'support_services', 'gas_stations', 'markets', 'shelters'].each do |x|
|
||||||
|
get "/#{x}", to: "tables##{x}"
|
||||||
resources :recent_news
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class TablesControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
Loading…
Reference in New Issue