Put as_json back in person
This commit is contained in:
parent
d66fb24cdb
commit
1ced4c502d
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue