Call action & display nothing?

Can you do a periodically_call_remote to an action but then not display
any new view? say the new action was called ADD. I don’t want to do an
rhtml file for add, and I don’t want to render anything in the
controller… I want to leave the page as it is. How is this done?

Thanks,
Ben L.

Ben L. wrote:

Can you do a periodically_call_remote to an action but then not display
any new view? say the new action was called ADD. I don’t want to do an
rhtml file for add, and I don’t want to render anything in the
controller… I want to leave the page as it is. How is this done?

Thanks,
Ben L.

render(:nothing => true)

I actually tried that already, and it renders a blank page. I call
an action every 10 seconds to see if the user should be automatically
logged out, if not then I want them to keep browsing. If so, then I
re-render the page.

thanks for responding though!

Try using periodically_call_remote and using RJS to redirect them if
necessary. Something similar to the following should work.

def check_status
render :update do |page|
page.redirect_to :action => ‘login’ if session.expired?
end
end

-Jonathan.

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