Skip to content

Instantly share code, notes, and snippets.

@thenickcox
Last active August 29, 2015 14:22
Show Gist options
  • Save thenickcox/e3ad77ef9139e83182cb to your computer and use it in GitHub Desktop.
Save thenickcox/e3ad77ef9139e83182cb to your computer and use it in GitHub Desktop.
module PersonDetails
class PeopleController < PersonDetails::ApplicationController
respond_to :json, only: :show
def show
respond_to do |format|
format.json do
@person = OpenStruct.new(person_details)
render :show
end
end
end
private
def person_details
profile = Services::PersonProfileService.get_overview(params[:person_id])
employer = Employment::Services::EmployerInfoService.get_employment_info_for(params[:person_id])
profile.merge(employer)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment