Help with remote_function

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

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…

Thanks works perfectly.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs