Include useful URLs in note responses
This commit is contained in:
parent
28b4c624b8
commit
91b3d1a83f
3 changed files with 9 additions and 0 deletions
|
@ -11,5 +11,8 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
|
|||
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
|
||||
|
|
|
@ -7,6 +7,9 @@ end
|
|||
|
||||
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
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue