2009-12-16 4 views

Répondre

3
<%= link_to '<span>demo</span>', :action => 'test', :path => '' %> 
+0

Oh je vois. Et si c'était quelque chose comme ça? <% link_to h (nomfichier),: action => 'test'%> – Amy

+0

<% = lien_à " # {h (nomfichier)}",: action => 'test',: chemin => ''%> –

+0

Cool, merci pour votre aide :) – Amy

7
<% link_to :action => 'test', :path => '' do %> 
    <span>demo</span> 
<% end %> 
+0

L'API Rails vous soutient avec son exemple de bloc à l'adresse http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M001597 –

1

ou vous pouvez utiliser link_to content_tag (SPAN, "demo") ,: action => 'test',: chemin => ''

Questions connexes