From kjvarga at gmail.com Tue Apr 19 20:49:23 2011 From: kjvarga at gmail.com (Karl Varga) Date: Tue, 19 Apr 2011 17:49:23 -0700 Subject: [Cells-talk] MissingTemplate when using render :json Message-ID: Hi Nick, We're getting a ActionView::MissingTemplate error in an action when we do a: render :json => ... I saw this brief discussion about it: http://groups.google.com/group/cells-and-apotomo/browse_thread/thread/dfd788ddf4d3ea3e?pli=1 I just want to confirm that you think it's Cells that is wrapping the render call and changing the default Rails behaviour? -- Karl Varga e: kjvarga at gmail.com w: kjvarga.blogspot.com c: +1.250.884.9895 Skype: kjvarga -------------- next part -------------- An HTML attachment was scrubbed... URL: From apotonick at gmail.com Wed Apr 20 15:12:12 2011 From: apotonick at gmail.com (Nick Sutterer) Date: Wed, 20 Apr 2011 21:12:12 +0200 Subject: [Cells-talk] MissingTemplate when using render :json In-Reply-To: References: Message-ID: On Wed, Apr 20, 2011 at 2:49 AM, Karl Varga wrote: > Hi Nick, > We're getting a?ActionView::MissingTemplate error in an action when we do a: > render :json => ... > I saw this brief discussion about it: > http://groups.google.com/group/cells-and-apotomo/browse_thread/thread/dfd788ddf4d3ea3e?pli=1 > I just want to confirm that you think it's Cells that is wrapping the render > call and changing the default Rails behaviour? > Hm, yeah. The problem with :json is that Rails also wants to set a content-type in the header, and more. Did you try render :format => :json to get the .json template rendered? Or is there no .json and all you want is sending back a string? Nick > -- > Karl Varga > e: kjvarga at gmail.com > w: kjvarga.blogspot.com > c: +1.250.884.9895 > Skype: kjvarga > > _______________________________________________ > Cells-talk mailing list > Cells-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/cells-talk > > From kjvarga at gmail.com Wed Apr 20 18:26:40 2011 From: kjvarga at gmail.com (Karl Varga) Date: Wed, 20 Apr 2011 15:26:40 -0700 Subject: [Cells-talk] MissingTemplate when using render :json In-Reply-To: References: Message-ID: > > Hm, yeah. The problem with :json is that Rails also wants to set a > content-type in the header, and more. Did you try > > render :format => :json > > to get the .json template rendered? Or is there no .json and all you > want is sending back a string? > That's right, I just want to return a string in JSON format. I've checked that the request has the correct Accept header because I saw this thread: http://stackoverflow.com/questions/3798822/outputting-json-in-a-rails-app Then I saw the Cells-Apotomo thread and wondered if Cells could be involved... On Wed, Apr 20, 2011 at 12:12 PM, Nick Sutterer wrote: > On Wed, Apr 20, 2011 at 2:49 AM, Karl Varga wrote: > > Hi Nick, > > We're getting a ActionView::MissingTemplate error in an action when we do > a: > > render :json => ... > > I saw this brief discussion about it: > > > http://groups.google.com/group/cells-and-apotomo/browse_thread/thread/dfd788ddf4d3ea3e?pli=1 > > I just want to confirm that you think it's Cells that is wrapping the > render > > call and changing the default Rails behaviour? > > > Hm, yeah. The problem with :json is that Rails also wants to set a > content-type in the header, and more. Did you try > > render :format => :json > > to get the .json template rendered? Or is there no .json and all you > want is sending back a string? > > Nick > > > > -- > > Karl Varga > > e: kjvarga at gmail.com > > w: kjvarga.blogspot.com > > c: +1.250.884.9895 > > Skype: kjvarga > > > > _______________________________________________ > > Cells-talk mailing list > > Cells-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/cells-talk > > > > > _______________________________________________ > Cells-talk mailing list > Cells-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/cells-talk > -- Karl Varga e: kjvarga at gmail.com w: kjvarga.blogspot.com c: +1.250.884.9895 Skype: kjvarga -------------- next part -------------- An HTML attachment was scrubbed... URL: