How do I wrap span tags in a link_to in slim?

前端 未结 3 2226
闹比i
闹比i 2021-02-20 13:35
li = link_to \'Account\', \'#account\', data: { toggle: \'tab\' }

I need span tags around \'Account\'.

3条回答
  •  再見小時候
    2021-02-20 14:20

    li = link_to content_tag(:span, 'Account'), '#account', data: { toggle: 'tab' }
    

    http://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-tag

提交回复
热议问题