[Catalyst] Issue with JSON view
Tatsuhiko Miyagawa
miyagawa at gmail.com
Thu Aug 9 02:07:21 GMT 2007
On 8/8/07, Mesdaq, Ali <amesdaq at websense.com> wrote:
> $c->forward('scorer::View::JSON');
> }
>
>
> My understanding may be wrong but the json view should create the
> headers and return the result itself right? I shouldn't need to create a
> template file on disk for a json view or so I assume. The only thing I
> can think of is that for some reason it is still being sent to my TT
> view.
I encountered with this probelm a few week ago with my pet project.
I've never used View::JSON with my real project.
Try this instead:
$c->stash->{current_view} = 'JSON';
The View::JSON doc is kinda obsolete and I guess incompatible with the
current RenderView default action.
If there's a better way to do this, let me know and I'll update the doc.
--
Tatsuhiko Miyagawa
More information about the Catalyst
mailing list