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

David Morton mortonda at dgrmm.net
Thu Jan 19 02:13:37 EST 2006


-----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-----


More information about the Instantrails-users mailing list