Auf aktuelle Action verlinken

Der heutige Script-Tip zeigt wie ihr auf die aktuelle Action verlinken könnt. Obwohl es relativ einfach ist, ist es nicht ausreichend dokumentiert.

Quellcode:

<%= link_to "Link-Text auf die aktuelle Action", :action => controller.action_name %>

Eingestellt am 14.09.2009 um 08:00

Kategorie: Tutorials

Be Sociable, Share!

Kommentare für diesen Artikel wurden geschlossen.

Suchen auf rubyonrails.de

Aktuelle Rails Version + Abhängigkeiten:

Gem rails-3.0.0
actionmailer (= 3.0.0, runtime)
actionpack (= 3.0.0, runtime)
activerecord (= 3.0.0, runtime)
activeresource (= 3.0.0, runtime)
activesupport (= 3.0.0, runtime)
bundler (~> 1.0.0, runtime)
railties (= 3.0.0, runtime)

Rails auf Rubyforge
Rails auf Github