Guest User

Untitled

a guest
May 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. respond_to do |format|
  2. format.html # show.html.erb
  3. format.xml { render :xml => @ltest }
  4. end
  5.  
  6. <ltest>
  7. ....
  8. <sub_test>
  9. ...
  10. </sub_test>
  11. <sub_test>
  12. ...
  13. </sub_test>
  14. </ltest>
  15.  
  16. format.xml { render :xml => @ltest.to_xml(:include => :sub_tests) }
  17.  
  18. <%= @ltest.to_xml :include => [ :sub_tests ]%>
  19.  
  20. <%= @ltest.to_xml(:include => {
  21. :test_group => { :include => [ :user ]},
  22. :sub_tests => { :include => {
  23. :attachments => {},
  24. :errors => {},
  25. :test_bugs => {},
  26. } },
  27. :attachments => {},
  28. :errors => {},
  29. :test_bugs => {},
  30. :test_nodes => { :include => {
  31. :node => { :include => [ :networks ]},
  32. :attachments => {},
  33. }}
  34. } ) %>
  35.  
  36. render :xml => @record.to_xml(:include => {:groups => {:include => {:questions => {:include => :items}}}})
Add Comment
Please, Sign In to add comment