]> git.openstreetmap.org Git - rails.git/blob - app/views/note/_note.json.jsonify
Use jsonify to create JSON for notes so that it is properly formatted
[rails.git] / app / views / note / _note.json.jsonify
1 json.type "Feature"
2
3 json.geometry do
4   json.type "Point"
5   json.coordinates [ note.lon, note.lat ]              
6 end
7
8 json.properties do
9   json.id note.id
10   json.date_created note.created_at
11   json.nearby  note.nearby_place
12   json.status note.status
13   json.closed_at note.closed_at if note.status == "closed"
14
15   json.comments(note.comments) do |comment|
16     json.date comment.created_at
17     json.uid comment.author_id unless comment.author_id.nil?
18     json.user comment.author_name
19     json.text comment.body
20   end
21 end