]> git.openstreetmap.org Git - rails.git/commitdiff
Include useful URLs in note responses
authorTom Hughes <tom@compton.nu>
Sun, 14 Oct 2012 10:00:33 +0000 (11:00 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 14 Oct 2012 12:52:58 +0000 (13:52 +0100)
app/views/notes/_note.gpx.builder
app/views/notes/_note.json.jsonify
app/views/notes/_note.xml.builder

index 4b9aa9869234cf56f55e6b8cee0d20370e77ae8a..22d9283ef7a8aff3a8b8c0af4df3225864ae5db3 100644 (file)
@@ -11,5 +11,8 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
     end
 
     xml.id note.id
     end
 
     xml.id note.id
+    xml.url note_url(note, :format => params[:format])
+    xml.comment_url comment_note_url(note, :format => params[:format])
+    xml.close_url close_note_url(note, :format => params[:format])
   end
 end
   end
 end
index ba9ccd944e663707cec48978b2b180a7ad549e4d..6afb4a555b9e5d0b1de6673563901a5781a597ab 100644 (file)
@@ -7,6 +7,9 @@ end
 
 json.properties do
   json.id note.id
 
 json.properties do
   json.id note.id
+  json.url note_url(note, :format => params[:format])
+  json.comment_url comment_note_url(note, :format => params[:format])
+  json.close_url close_note_url(note, :format => params[:format])
   json.date_created note.created_at
   json.nearby  note.nearby_place
   json.status note.status
   json.date_created note.created_at
   json.nearby  note.nearby_place
   json.status note.status
index 2a2b2ffc124f5a9c7eddcf47e5efe71f416955a5..c00b49c73ba95d5857c5801a5236bdced5e17a82 100644 (file)
@@ -1,5 +1,8 @@
 xml.note("lon" => note.lon, "lat" => note.lat) do
   xml.id note.id
 xml.note("lon" => note.lon, "lat" => note.lat) do
   xml.id note.id
+  xml.url note_url(note, :format => params[:format])
+  xml.comment_url comment_note_url(note, :format => params[:format])
+  xml.close_url close_note_url(note, :format => params[:format])  
   xml.date_created note.created_at
   xml.nearby note.nearby_place
   xml.status note.status
   xml.date_created note.created_at
   xml.nearby note.nearby_place
   xml.status note.status