Hi All, I''m trying to figure out the best of a million ways to generate a waiting page. For instance, if I have administrators waiting to approve "Posts" that are in queue, and there are currently no "Posts" waiting to be approved, I''d like them to be sent to a "Waiting" page until more are available then refresh every few seconds and Javascript redirect them to the "Approval" page once more are available. Is this a reasonable enough request? How would I go about it? Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 17 Jun 2008, at 22:31, gberz3 wrote:> > Hi All, > > I''m trying to figure out the best of a million ways to generate a > waiting page. For instance, if I have administrators waiting to > approve "Posts" that are in queue, and there are currently no "Posts" > waiting to be approved, I''d like them to be sent to a "Waiting" page > until more are available then refresh every few seconds and Javascript > redirect them to the "Approval" page once more are available. > > Is this a reasonable enough request? How would I go about it? >You could easily enough have a periodically_call_remote that would poll some url. when the time is right have that page render page.redirect_to :action => ''the_good_stuff'' (assuming you are using rjs). Fred> Thanks in advance. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 17, 5:35 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You could easily enough have a periodically_call_remote that would > poll some url. when the time is right have that page render > page.redirect_to :action => ''the_good_stuff'' (assuming you are using > rjs).Could you use RJS to call a helper method? Also, I''m having the worst time with Rails and routing. I create custom routes but it is insistent on finding an Object with "said" ID. I know it''s breaking form, but I''d like to be able to have a "waiting" route that is part of a particular path, and have it render the "waiting.html.erb" page without complaint. I''d assume there is a way to do that, but I''ve been out of the Rails loop for a bit. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---