Christian R. wrote:
I have a link_to_remote() in my view which activates an action (say
“filter()”). In this action something is done (maybe a “Test.find(:all)”).
Now I want to pass these items to another action (I made it with
render(:action => ‘list’)), which paginates theses items and loads the
view, that belongs to the action. But because of Ajax no
view is visible. I have no clue why.
The key is to understand what you’re trying to do in the context of the
Rails request/response cycle. It’s also somewhat important to
that a Rails app ‘lives’ for exactly one request/response cycle. Rails
treatsevery request as though it was the first it’s heard of anything.
this case, the browser has sent a request to the server that tells the
server, via the message type, that it expects an executable response.
server, on the other hand, will send back whatever your application
to send back. If you tell your app to send back html instead of js, it
will. And the browser will ‘execute’ the html which will result in
what you’re seeing: nothing.
Maybe the second action (list) is never rendered?
I recommend you download and begin using Firebug. Then you’ll be able
see exactly what’s being requested and rendered. You are using Firefox,
But how is it possible to realise this request?
To get a good start, I recommend Cody F.'s RJS tutorial on O’Reilly.
Excellent material at a ‘duh’ price.
Any hint would be great.
PS. If you decide you want more than a hint, feel free to ask It’s
very helpful list.