Skip to content

Commit 14bb881

Browse files
author
Nicholas Watson
committed
2 parents 79974b5 + 6040a6c commit 14bb881

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

app/models/asset_photo.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
class AssetPhoto < ActiveRecord::Base
22
belongs_to :photoable, :polymorphic => true
33
belongs_to :photo
4-
end
4+
end
5+

app/models/comment.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ class Comment < ActiveRecord::Base
55

66
# NOTE: Comments belong to a profile
77
belongs_to :profile
8+
9+
def as_json(options={})
10+
hash = super.as_json
11+
# add profile to json
12+
hash["profile"] = self.profile
13+
return hash
14+
end
815
end

0 commit comments

Comments
 (0)