On 28 Jan 2009, at 10:30, Ricky <[email protected]> wrote:

>
> I was wondering what the purpose of wrapping a redirect_to in a
> format.html block is. I get why you'd want to do this with a render,
> but if you're redirecting the browser to another URL, what's the
> point? As I understand it, when redirect_to is called, Rails sends a
> 302 back to the browser,

It might not be a browser. Eg with a create action you would typically  
redirect browsers to the show action, but the XML api probably  
wouldn't do that.

Fred


> so I'm having trouble understanding why
> format plays any part in this. No biggie, just need some clarification
> on what's actually happening.
>
> Cheers,
> Ricky
> >

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to