diff --git a/app/controllers/api/v1/mobile_controller.rb b/app/controllers/api/v1/mobile_controller.rb index dd07496..63a575d 100644 --- a/app/controllers/api/v1/mobile_controller.rb +++ b/app/controllers/api/v1/mobile_controller.rb @@ -16,6 +16,8 @@ class Api::V1::MobileController < ApplicationController if params[:class] model = params[:class].classify.constantize respond_with model.all.to_json + else + respond_with nil.to_json end end diff --git a/config/routes.rb b/config/routes.rb index df7bf2d..0ed76af 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -33,14 +33,14 @@ Railsgoat::Application.routes.draw do resources :messages do end - + resources :pay do collection do post "update_dd_info" post "decrypted_bank_acct_num" end end - + end get "download" => "benefit_forms#download" @@ -90,10 +90,11 @@ Railsgoat::Application.routes.draw do get "home" end end - + namespace :api, defaults: {format: 'json'} do namespace :v1 do resources :users + resources :mobile end end