# Help with remote\_function

**URL:** <https://www.ruby-forum.com/t/help-with-remote-function/82984>\
**Category:** Rails\
**Created:** [January 22, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/help-with-remote-function/82984 "2007-01-22T22:08:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9f8e36/32.png) [@kim](https://www.ruby-forum.com/u/kim)\
**Post date:** [January 22, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/help-with-remote-function/82984/1 "2007-01-22T22:08:44Z")

</div>

Hello I have this in a partial called \_publish\_status.rhtml

Published \<%= radio\_button('page', 'published',true, :onclick =\>remote\_function(:update =\> "@page.published", :url =\> { :action =\> :publish\_status, :id =\> 1 }) )%\>

then in my controller:

def publish\_status  
@page.published = params[:id]  
@page.save  
end

Everything works just like I want it to, but in my development log I  
see this:  
ActionController::MissingTemplate (Missing template C:/Documents and  
Settings/griggsk/user/ICA/config/…/app/views/creation/publish\_status.rhtml):

Should I worry about this? How do I fix it?

Thanks in advance -K

---

<div class="post-metadata">

**Author:** ![kim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9f8e36/32.png) [@kim](https://www.ruby-forum.com/u/kim)\
**Post date:** [January 22, 2007, 10:12pm UTC](https://www.ruby-forum.com/t/help-with-remote-function/82984/2 "2007-01-22T22:12:45Z")

</div>

> def publish\_status  
> @page.published = params[:id]  
> @page.save  
> end
> 
> Everything works just like I want it to, but in my development log I  
> see this:  
> ActionController::MissingTemplate (Missing template C:/Documents and  
> Settings/griggsk/user/ICA/config/…/app/views/creation/publish\_status.rhtml):
> 
> Should I worry about this? How do I fix it?

Well, if you don’t want to return any content/status to the browser  
indicating that it worked or not just add this to the end of your  
publish\_status() method:

render :nothing =\> true, :layout =\> false

That will stop the error from showing up…

---

<div class="post-metadata">

**Author:** ![kim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/9f8e36/32.png) [@kim](https://www.ruby-forum.com/u/kim)\
**Post date:** [January 22, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/help-with-remote-function/82984/3 "2007-01-22T22:22:48Z")

</div>

Thanks works perfectly.
