Restful routes

Kann mir mal jemand sagen wie ich Routen für statische Seiten
hinbekomme?

Was schreibe ich in die routes?

map.about_us ’ ', :controller => ‘about_us’, :action => ‘kontakt’ ???

und der link ?
alt:
<%= link_to ‘About Us’, :controller => ‘about_us’, :action =>
‘kontakt’ %>
neu :
<%= link_to ‘About Us’, about_us() %>

das klappt alles nicht

Ich benötige da mal ein funktionierendes Beispiel und finde nix…
Gruß und Danke

Werner L.
Lindenburger Allee 22 - 50931
Köln
0221.8805 635


http://www.webagentur-laude.de

Hallo Werner.

Werner L. schrieb:

Kann mir mal jemand sagen wie ich Routen für statische Seiten hinbekomme?

Was hat das denn mit Restful routes zu tun? :wink:

Was schreibe ich in die routes?

map.about_us ’ ', :controller => ‘about_us’, :action => ‘kontakt’ ???

Du verwendest hier ganz normale “Named Routes”. Schau daher mal unter
diesem Stichwort hier nach:
http://api.rubyonrails.org/classes/ActionController/Routing.html

map.about_us bietet Dir die Möglichkeit, in den Views about_us_path()
und about_us_url() zu verwenden, nicht about_us().

Viele
Grüße,Sebastian

Am 03.02.2008 um 13:08 schrieb Sebastian Röbke:

Ja prima…

das ist alles noch neu für mich…
Aber klappt…

Gruß


rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Werner L.
Lindenburger Allee 22 - 50931
Köln
0221.8805 635


http://www.webagentur-laude.de