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 Lisbakken -- Posted via http://www.ruby-forum.com/.
Ben Lisbakken 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 Lisbakkenrender(:nothing => true) -- R.Livsey http://livsey.org
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! On Jun 21, 2006, at 7:05 PM, Richard Livsey wrote:> Ben Lisbakken 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 Lisbakken > > render(:nothing => true) > > -- > R.Livsey > http://livsey.org > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
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. On 6/22/06, Ben Lisbakken <lisbakke@gmail.com> wrote:> 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! > > On Jun 21, 2006, at 7:05 PM, Richard Livsey wrote: > > > Ben Lisbakken 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 Lisbakken > > > > render(:nothing => true) > > > > -- > > R.Livsey > > http://livsey.org > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >