Sha256: d9478d882642a77294eca6c77713650c0266c7880d6d7dad51002244e1e544bd
Contents?: true
Size: 611 Bytes
Versions: 6
Compression:
Stored size: 611 Bytes
Contents
module EgovUtils class PeopleController < ApplicationController load_and_authorize_resource def index @people_schema = PersonSchema.new @people_schema.from_params(params) respond_to do |format| if params['_type'] == 'query' format.json{ render json: { results: @people_schema.entities.includes(:residence).collect do |p| {id: p.id, text: p.to_s, residence: p.residence.to_s} end }} else format.json{ render json: @people_schema } end end end def show end end end
Version data entries
6 entries across 6 versions & 1 rubygems