Greg Hauptmann
2007-Jan-22 23:47 UTC
How to stop action in controller trying to render something?
Hi, I have a B2B type action in a controller for which an external system hits my site to provide updates. Quesion - How do I stop my action in my controller trying to perform a render, i.e. to keep my logs clean. At the moment it trys to render but of course there is no page to render. Tks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ChrisR
2007-Jan-22 23:56 UTC
Re: How to stop action in controller trying to render something?
Have you tried render :nothing => true, :layout => false Greg Hauptmann wrote:> Hi, > > I have a B2B type action in a controller for which an external system hits > my site to provide updates. > > Quesion - How do I stop my action in my controller trying to perform a > render, i.e. to keep my logs clean. At the moment it trys to render but of > course there is no page to render. > > Tks > > ------=_Part_98227_23324871.1169509623820 > Content-Type: text/html; charset=ISO-8859-1 > X-Google-AttachSize: 328 > > Hi,<br><br>I have a B2B type action in a controller for which an external system hits my site to provide updates. <br><br>Quesion - How do I stop my action in my controller trying to perform a render, i.e. to keep my logs clean. At the moment it trys to render but of course there is no page to render. > <br><br>Tks > > ------=_Part_98227_23324871.1169509623820----~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Bart
2007-Jan-23 06:15 UTC
Re: How to stop action in controller trying to render something?
You can always return false, but I think Chris'' way is the official Rails 1.2 way of doing this. def my_method ... return false end --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2007-Jan-23 20:42 UTC
Re: How to stop action in controller trying to render something?
thanks guys - Bart this seemed to work fine on rails 1.1.6 On 1/23/07, Bart <bart-ERYYqGLKSZVWk0Htik3J/w@public.gmane.org> wrote:> > > You can always return false, but I think Chris'' way is the official > Rails 1.2 way of doing this. > > def my_method > ... > return false > end > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---