# :action not working in replace\_html

**URL:** <https://www.ruby-forum.com/t/action-not-working-in-replace-html/184191>\
**Category:** Rails\
**Created:** [February 26, 2010, 1:02pm UTC](https://www.ruby-forum.com/t/action-not-working-in-replace-html/184191 "2010-02-26T13:02:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![loganathanbk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@loganathanbk](https://www.ruby-forum.com/u/loganathanbk)\
**Post date:** [February 26, 2010, 1:02pm UTC](https://www.ruby-forum.com/t/action-not-working-in-replace-html/184191/1 "2010-02-26T13:02:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![loganathanbk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@loganathanbk](https://www.ruby-forum.com/u/loganathanbk)\
**Post date:** [February 26, 2010, 1:28pm UTC](https://www.ruby-forum.com/t/action-not-working-in-replace-html/184191/2 "2010-02-26T13:28:42Z")

</div>

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
