I''m using a Flex app to post to a controller called segments using the
url http://localhost:3000/segments and am able to successfully create
the record in AR. However the block of code that should return the ID
of the new record being created in XML which is this
respond_to do |format|
if @segment.save
format.xml { render :xml => @segment, :status => :created,
:location => @segment }
else
format.xml { render :xml => @segment.errors, :status =>
:unprocessable_entity }
end
end
end
Seems to be returning the following instead
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
<HEAD><TITLE>Not Found</TITLE></HEAD>
<BODY>
<H1>Not Found</H1>
`/segments/'' not found.
<HR>
<ADDRESS>
WEBrick/1.3.1 (Ruby/1.8.6/2007-09-24) at
localhost:3000
</ADDRESS>
</BODY>
</HTML>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---