在我的.haml文件中,我有
= employee.label:tos_confirmation,'我同意服务条款。',:class => '宽'
如何使服务条款成为超链接?
答案 0 :(得分:2)
= link_to employee.label(:tos_confirmation,
'I agree to the Terms of Service.',
:class => 'wide'),
'http://example.com/tos'
答案 1 :(得分: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
我唯一缺少的是"员工"部分,这不太重要。