Forum: Rails-ES atributo rel en helper link_to

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fernando S. (Guest)
on 2007-07-20 14:28
(Received via mailing list)
Buenas,

Alguien sabría decirme como implementar el atributo rel en un helper
link_to?

<li><%= link_to "Concerts", { :controller => "partners", :action =>
"external", :rel => "tab2" } %></li>

(esto no funciona)

muchas gracias y un saludo
Luis V. (Guest)
on 2007-07-20 15:46
(Received via mailing list)
Creo que era así:

<%=link_to "Concerts", {:controller => "partners", :action =>
"external"},
{:rel => "tab2"} %>

Si miras el método,

def link_to(name, options = {}, html_options = nil)

Se le manda el nombre que te va a salir entre las etiquetas <a>, un hash
con
la url que se va a crear y las opciones de html.

Ahí es donde puedes meter {:rel => "tab2", :class => "tu_clase", :style
=>
"tu_estilo"}, etc.
This topic is locked and can not be replied to.