i want to make render xml for an complex object
ex
make render :xml => posters
poster = [name, post_id,created_at, …]
post = [title, body,created_at, …]
and i want the render output to be
name title body ... ... ... ...thanks in advance
M.SH
i want to make render xml for an complex object
ex
make render :xml => posters
poster = [name, post_id,created_at, …]
post = [title, body,created_at, …]
and i want the render output to be
name title body ... ... ... ...thanks in advance
M.SH
On Tue, Apr 3, 2012 at 4:18 PM, M.SH [email protected] wrote:
... ... ... ...
You could have in your …/app/views/posters/
a file
index.xml.builder
which may be automatically called when the
request needs to render XML. The file
could start like this:
xml.instruct!
xml.posters do
@posters.each do |poster|
xml.poster(…
…
end
end
end
Check out Google for “xml builder Ruby”
and this project from Jim W…
GitHub - jimweirich/builder: Provide a simple way to create XML markup and data structures.
HTH,
Peter
Thank u very much , that is what i need
On Tue, Apr 3, 2012 at 5:51 PM, Peter V.
[email protected]wrote:
<poster> </post>
index.xml.builder
end
Peter
–
-------------------------
محمد شحاته
4th year* Computer and Systems **Department
Alexandria University
Egypt
*
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs