Sha256: 2193fa5d8d6cedf763cdc7296728249f28d8f53b521abcfb71f22e60a3b7100a
Contents?: true
Size: 568 Bytes
Versions: 31
Compression:
Stored size: 568 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.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 end end
Version data entries
31 entries across 31 versions & 1 rubygems