veganstraightedge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-04 09:33 UTC
how to? link_to with a rel="tag"
i want my html output to look like this: <a href="/path/to/page/" rel="tag">link text</a> how do i tell the link_to method that i need: rel="tag"? thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
veganstraightedge@... <veganstraightedge@...> writes:> > > i want my html output to look like this: > > <a href="/path/to/page/" rel="tag">link text</a> > > how do i tell the link_to method that i need: rel="tag"? >From: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M000378 - link_to(name, options = {}, html_options = nil, parameters_for_method_reference) html_options in a Rails function generally means parameters which will be inserted into the HTML tag, so: link_to "link text", "/path/to/page/", {:rel => "tag"} Gareth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> veganstraightedge@... <veganstraightedge@...> writes:>> i want my html output to look like this: >> >> <a href="/path/to/page/" rel="tag">link text</a> >> >> how do i tell the link_to method that i need: rel="tag"? >> > > From: > http://api.rubyonrails.org/classes/ActionView/Helpers/ > UrlHelper.html#M000378 > > - link_to(name, options = {}, html_options = nil, > parameters_for_method_reference) > > html_options in a Rails function generally means parameters which > will be > inserted into the HTML tag, so: > > link_to "link text", "/path/to/page/", {:rel => "tag"}thanks gareth. though that wasn''t quite right either. ryan davis gave me this fix on another list link_to("link text", {:controller => "controller_name", :action => "action_name", :id => "id_value"}, :rel => "tag") i''m just posting this for posterity. and in case someone else ever needs it. thanks. shane --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---