Maybe you're not requesting it properly, making sure that you call the format.json part? It seems it redirects to requests_url in format.html.
/Lasse 2010/3/23 Kad Kerforn <li...@ruby-forum.com> > in my controller the create action is : > > respond_to do |format| > if @request.save > flash[:notice] = 'Request was successfully created.' > format.html { redirect_to requests_url } > format.xml { render :xml => @request, :status => :created, > :location => @request } > format.json { render :json => {:result => 'success', :redirect > => requests_url } } > format.js > else > ..... > > once the request is saved, ... I get in the log > > Completed in 563ms (View: 1, DB: 5) | 200 OK [http://localhost/requests] > > I should have > 200 OK [http://localhost:3000/requests] > -- > 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-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.