2012-01-16 178 views

回答

2

我一直在寻找的答案是这样的:

%label.wide{:for => "tos_confirmation"} 
    I agree to the 
    %a{:href => "/tos"} Terms of Service 
    and 
    = succeed "." do 
     %a{:href => "/privacy_policy"} Privacy Policy 

我唯一缺少的部分是“员工”的一部分,这是不是太重要。

+0

为了帮助所有人,请查看这个html to haml转换工具http://html2haml.heroku.com/ – rapidror 2012-01-18 03:07:30

2
= link_to employee.label(:tos_confirmation, 
         'I agree to the Terms of Service.', 
         :class => 'wide'), 
      'http://example.com/tos' 
+0

冷静,如果我只想“服务条款”是一个超链接,其余的只是文字,我该怎么做呢? – rapidror 2012-01-16 06:00:29

+0

这将是你的功课。 – 2012-01-16 06:01:01

+0

好的谢谢你的帮助! – rapidror 2012-01-16 06:04:49