2012-01-16 179 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