Added volunteering api

This commit is contained in:
Abhi Yerra 2017-10-10 19:07:59 +00:00
parent bc28417fff
commit c31c6b7bb8
3 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1,4 @@
class Volunteering < Airrecord::Table
self.base_key = "appsj7gOti4YuE2v1"
self.table_name = "Volunteering"
end

View File

@ -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