On 08 Jun 2011, at 09:17, pipplo wrote:

I have a rails 2 app that I am upgrading to rails 3.

I am exposing a web service to a phone app.  When I make a request
from the phone application the CONTENT_TYPE is application/json

In rails 2 my controller recognizes this as json, but in rails 3 my
controller recognizes it as html.

     respond_to do |format|
       format.html {  }
       format.json { }
     end

Any ideas why the format isn't being set to json in rails 3?  Do i
have to do something to enable json routing?

This might be useful: 
http://ryandaigle.com/articles/2009/8/10/what-s-new-in-edge-rails-default-restful-rendering


Best regards

Peter De Berdt

--
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@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.

Reply via email to