Use resourceful routes for api messages in/outbox

This commit is contained in:
Anton Khorev 2024-12-22 06:57:39 +03:00
parent 017f7da76f
commit 45c90003c6
16 changed files with 344 additions and 288 deletions

View file

@ -1,5 +0,0 @@
json.partial! "api/root_attributes"
json.messages do
json.array! @messages, :partial => "message", :as => :message
end

View file

@ -1,7 +0,0 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
xml.tag! "messages" do
osm << (render(@messages) || "")
end
end

View file

@ -0,0 +1,5 @@
json.partial! "api/root_attributes"
json.messages do
json.array! @messages, :partial => "api/messages/message", :as => :message
end

View file

@ -0,0 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/messages/message", :collection => @messages) || "")
end

View file

@ -1,5 +0,0 @@
json.partial! "api/root_attributes"
json.messages do
json.array! @messages, :partial => "message", :as => :message
end

View file

@ -1,5 +0,0 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(@messages) || "")
end