I wondered if anyone can help me, I am trying to add some basic ajax to
my new project but I've run into a problem.
I have a RESTful ProductsController which uses pagination, I would like
to basically re-render the index template on susbequent ajax calls to
the index action. However the following doesn't work
render (:update) do |page|
page.replace_html 'main', :template => 'index'
The response I receive is
which has the effect of empty the contents of my 'main' div, which is
not very helpful. It seems the following works, but its not what I need.
page.replace_html 'main', :partial => 'somepartial'
Any one have any ideas, do I just have the syntax wrong?