Adding a hyperlink to a pop-up window on a form field label in Rails

Is there a way to embed a hyperlink in a form label in Rails using link_to?

I am trying to do this in a form field as follows:

<%= f.label "Accept Terms of Service?" %>

I appreciate any ideas.

Try this:

<%= f.label("#{link_to('Accept Terms of Service', '/terms_of_service.html')}".html_safe) %>

Walter

> Is there a way to embed a hyperlink in a form label in Rails using link_to? > > I am trying to do this in a form field as follows: > > <%= f.label "Accept Terms of Service?" %>

Try this:

<%= f.label("#{link_to('Accept Terms of Service', '/terms_of_service.html')}".html_safe) %>

Looking at the api, I think it's possible to pass a block for a nested label tag