如何在此HAML代码中将link_to重定向到root_path?
.icon-bar.large.vertical.four-up
%a.item
%img{:src => "/svgs/fi-home.svg"}/
%label Home
快速的Google搜索将我带到这个https://rivalfox.com/blog/haml-best-practices/
因此,我将尝试以下方法,
= link_to root_path, class: ['btn', 'btn-default'] do
= image_tag 'fi-home.svg'
Home
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句