Skip to content

Commit

Permalink
Add authority full_name to json api output
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Sep 18, 2012
1 parent bdb72b9 commit 6c95315
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def index
else
s = @applications
end
render :json => s.to_json(:except => [:authority_id, :suburb, :state, :postcode, :distance]), :callback => params[:callback]
j = s.to_json(:except => [:authority_id, :suburb, :state, :postcode, :distance],
:include => {:authority => {:only => [:full_name]}})
render :json => j, :callback => params[:callback]
end
end
end
Expand Down

0 comments on commit 6c95315

Please sign in to comment.