Return note comments as formatted HTML as well as text

This commit is contained in:
Tom Hughes 2012-12-02 17:00:33 +00:00
parent c3cb1de73e
commit 2ddd667910
2 changed files with 9 additions and 2 deletions

View file

@ -24,6 +24,10 @@ json.properties do
end
json.action comment.event
json.text comment.body unless comment.body.nil?
if comment.body
json.text comment.body.to_text
json.html comment.body.to_html
end
end
end

View file

@ -21,7 +21,10 @@ xml.note("lon" => note.lon, "lat" => note.lat) do
xml.user_url user_url(:display_name => comment.author.display_name)
end
xml.text comment.body
if comment.body
xml.text comment.body.to_text
xml.html comment.body.to_html
end
end
end
end