:action not working in replace_html

Hi friend,

     I had used the below line in my Rjs file:

    page.replace_html("main",:action => "checkout")

I have a action called “checkout” but when I use it there is no
response. The response is null.

I read this function. In that they specified that we can give the
second argument either string or hash of options using for render. In
render we can give :action. Same when I use here it is not working.

Help me to solve this issue.

Thank you in advance.

Loganathan G. wrote:

Hi friend,

     I had used the below line in my Rjs file:

    page.replace_html("main",:action => "checkout")

I have a action called “checkout” but when I use it there is no
response. The response is null.

I read this function. In that they specified that we can give the
second argument either string or hash of options using for render. In
render we can give :action. Same when I use here it is not working.

Help me to solve this issue.

Thank you in advance.

Guys,
It is working if I give as below:

page.replace_html(“main”,:file =>
“app/views/store_book/checkout.html.erb”)

I don’t know why it is not working for :action. I also don’t know
whether it is efficient way to do. Anyway it solves the problem.

If any ideas welcome…

Thank you