Can I use link_to to link an image and a text

前端 未结 5 787
自闭症患者
自闭症患者 2020-12-31 21:03

Well, I am using \"font-awesome-rails\" gem. I am pretty much used to font-awesome outside Rails, but I guess it\'s not that popular among Rails community.

Once inst

5条回答
  •  礼貌的吻别
    2020-12-31 21:49

    Yes you can. For complex anchor such as images, just remove the first argument(the link text or anchor), and attach a block after the method.

    link_to(root_path){}
    

    The content inside block will become the anchor.

提交回复
热议问题