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?
|
self.posts.where(:type => "Photo").exists?
|
||||||
end
|
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
|
protected
|
||||||
|
|
||||||
def clean_url
|
def clean_url
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue