开发者

image_tag inside link_to => undefined method `symbolize_keys!' for "auth/facebook":String

开发者 https://www.devze.com 2023-01-23 21:08 出处:网络
I think I\'m missing a little something here ... the it\'s a simple image inside a link. The 开发者_运维技巧code :

I think I'm missing a little something here ... the it's a simple image inside a link. The 开发者_运维技巧code :

<%= link_to image_tag "facebook.png", "auth/facebook" %>

The error is : undefined method 'symbolize_keys!' for "auth/facebook":String

What'd I do wrong here ?


This is because you're passing the args to the wrong methods:

<%= link_to (image_tag ("facebook.png", "auth/facebook")) %>

Oh, why would you ever want to do this?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号