This commit is contained in:
albert
2013-03-01 06:27:48 -08:00
parent 597e566ee4
commit 48953df07b
3 changed files with 21 additions and 8 deletions

View File

@@ -835,7 +835,10 @@ class Post < ActiveRecord::Base
options ||= {}
options[:except] ||= []
options[:except] += hidden_attributes
super(options)
hash = super(options)
hash["uploader_name"] = uploader_name
hash["has_large"] = has_large
hash
end
def to_xml(options = {}, &block)
@@ -847,13 +850,6 @@ class Post < ActiveRecord::Base
super(options, &block)
end
def serializable_hash(options = {})
hash = super(options)
hash["uploader_name"] = uploader_name
hash["has_large"] = has_large
hash
end
def to_legacy_json
return {
"has_comments" => last_commented_at.present?,