Hi Tom,
Take a look at this cheatsheet which explains nested restful routing
http://www.scribd.com/doc/126939/REST-Cheatsheet

-
tommy

On Dec 10, 7:58 am, tom hartwell <[EMAIL PROTECTED]> wrote:
> Hey everyone, I had a question about the render method inside a Rails
> controller.  Looking at the source of the render method (http://
> api.rubyonrails.org/classes/ActionController/Base.html#M000512) it
> seems like it does not process a path prefix or nested route.  An
> example that I'm banging my head against follows:
>
> 1) Player signs up for a league via a nested url "/leagues/1/players/
> new"
> 2) There is an error in the information submitted
> 3) In my controller I would like to retain the errors so a redirect_to
> cannot be used, but render doesn't seem to do the trick, either.
> Something like the following (if it were supported) would work:
>
> render :action => 'new', :prefix => "leagues/#{params[:league_id]}"
>
> Perhaps I'm missing something and there is a way to do it.  Thanks,
> Tom
--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to