diff options
author | Francis Irving <francis@mysociety.org> | 2010-10-20 15:53:11 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-10-20 15:53:11 +0100 |
commit | e36720f39d8e8e89f5adf396aa76cd2509574da3 (patch) | |
tree | 9207eec1b257ef681059bf4042267859be82f434 /app/controllers/user_controller.rb | |
parent | 095efc46d2a029b4a72a25c0998adc09f8284e5f (diff) |
Factor out some of the JSON generation
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 1fa3a1778..87152b7ca 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -55,17 +55,7 @@ class UserController < ApplicationController respond_to do |format| format.html { @has_json = true } - format.json { - render :json => { - :id => @display_user.id, - :url_name => @display_user.url_name, - :name => @display_user.name, - :ban_text => @display_user.ban_text, - :about_me => @display_user.about_me, - # :profile_photo => @display_user.profile_photo # ought to have this, but too hard to get URL out for now - # created_at / updated_at we only show the year on the main page for privacy reasons, so don't put here - } - } + format.json { render :json => @display_user.json_for_api } end end |