adding routes. catching nulls

This commit is contained in:
Mike McCabe
2014-04-08 23:06:29 -04:00
committed by cktricky
parent c157496b1e
commit 6975f94381
2 changed files with 6 additions and 3 deletions
@@ -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