Ruby Forum Rails Germany > Bessere Urls

Posted by Rails Camper (railscamper)
on 03.05.2008 16:28
(Received via mailing list)
Ich habe eine URL die einen Datensatz anzeigen soll
Leider ist das Format http://foo.bar/test/show/1 ich hatte aber gerne so
etwas in die Richtung http://foo.bar/test/<region>-<name>-<id>

das kann ich doch bestimmt über die ressourcen abbilden, oder?


viele grüße von der Hollywoodschaukel

mario
Posted by Manuel Wiedenmann (Guest)
on 03.05.2008 17:59
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nested resourcen sind dein freund:

   map.resources :regions do |region|
     region.resources :names
   end

gruß 
manuel

Am 03.05.2008 um 16:27 schrieb Mario Schroeder:

> mario
>
> _______________________________________________
> rubyonrails-ug mailing list
> rubyonrails-ug@headflash.com
> http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFIHIvLs/WwCK0ZZEARAjWlAJ9wIqURf0/zvBrAEgkqy8dUIjTDsACgkdJP
tD9+WfnekZOQDSLX4eh/hpE=
=OUla
-----END PGP SIGNATURE-----