I want to send an XML file when get request is made
here is my my xml file
<forms>
<form url="http://ift.tt/1vB2DLG">Cascading Select Form</form>
<form url="http://ift.tt/1whxtnF">Widgets</form>
</forms>
this is my url
http://localhost:3000/forms/formlist
here is my ruby controller to send a xml
respond_to :xml
def formlist
respond_to do |format|
format.xml {//what should I write here to send formlist.xml}
end
end
here is route.rb
get 'forms/formlist' => 'forms#formlist'
but its not sending xml file giving error code something 422
Please help me
Thanks in advance.
No comments:
Post a Comment