I'm using the replace_html for updating a div element. How can I update it with an action from other controller? I'm looking for something like this
page.replace_html 'div1', :controller=> 'users' ,:action=>'list'
thanks
Christian
I'm using the replace_html for updating a div element. How can I update it with an action from other controller? I'm looking for something like this
page.replace_html 'div1', :controller=> 'users' ,:action=>'list'
thanks
Christian
Hi Christian,
I'm using the replace_html for updating a div element. How can I update it with an action from other controller? I'm looking for something like this
page.replace_html 'div1', :controller=> 'users' ,:action=>'list'
I assume there's some reason you're not just invoking the list method in the user controller directly, but given that you're not, you'll need to redirect_to that method using page.redirect_to ... Then in the rjs template for that method you can do the page.replace_html.
hth, Bill