[Instantrails-users] One Last Question for me..

MaxSteel maxsteel at gmail.com
Thu Jan 19 12:25:18 EST 2006


hi David..

I tried what you suggested, it does redirect me back to the right
place, however, now it isn't updating the category name.  Once I click
update it just returns me to the cat listing.

closer!  :)

On 1/19/06, David Morton <mortonda at dgrmm.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> MaxSteel wrote:
> > I'll ask here and then if someone will send me the url of where I go
> > to sign up for the rails type questions, that'd be great!
>
> www.rubyonrails.com -> Community -> Mailing List
>
> > because I've feverishly edited the show.rhtml (for a different
> > purpose) I get nasty errors after updating the category name.
> >
> > What is the easiest way to change that so it redirects back to say
> > /category/list ?
> >
> > i know that:
> > def show
> > redirect_to :action => 'list'
> > end
>
> You are redirecting in the wrong place.  Don't put the redirect in the place
> where you land, put it where you jump:
>
> def update
>  #code to update category...
>
>  redirect_to :action => 'list'
> end
>
>
> - --
> David Morton
> Maia Mailguard                        - http://www.maiamailguard.com
> Morton Software Design and Consulting - http://www.dgrmm.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFDzzwhSIxC85HZHLMRAq88AJ9VS7v0QcrrWgQBMZmBAk7fFSi+cgCgnks0
> 8anhaSO6mis+EzCj+BCrHSE=
> =5AXL
> -----END PGP SIGNATURE-----
> _______________________________________________
> Instantrails-users mailing list
> Instantrails-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/instantrails-users
>



More information about the Instantrails-users mailing list