Put as_json back in person

This commit is contained in:
Raphael Sofaer 2011-06-29 08:43:18 -07:00
parent d66fb24cdb
commit 1ced4c502d

View file

@ -219,6 +219,16 @@ class Person < ActiveRecord::Base
self.posts.where(:type => "Photo").exists?
end
def as_json(opts={})
{
:id => self.guid,
:name => self.name,
:avatar => self.profile.image_url(:thumb_small),
:handle => self.diaspora_handle,
:url => "/people/#{self.id}"
}
end
protected
def clean_url