Rubocop 行太长,请使用新的 Ruby 1.9 哈希语法
Rubocop line is too long and Use new Ruby 1.9 hash syntax
不调整yaml中的长度我怎么能把这行代码拿下来:
social_share_button_tag(@post.title, desc: '@post.title', image: ' @post.avatar(:medium)', :allow_sites => %w(twitter facebook google_plus linkedin pinterest), url: tiny_post_url(@post.url_name))
此外...我该如何处理:使用新的 Ruby 1.9 哈希语法?
我知道 :allow_sites => 出错了,但是当我将其更改为:
allow_sites: %w'(twitter facebook google_plus linkedin pinterest)'
它实际上不会显示twitter 和pinterest。有点疯狂。
我用过这个gem。您可以像下面这样使用:
不调整yaml中的长度我怎么能把这行代码拿下来:
social_share_button_tag(@post.title, desc: '@post.title', image: ' @post.avatar(:medium)', :allow_sites => %w(twitter facebook google_plus linkedin pinterest), url: tiny_post_url(@post.url_name))
此外...我该如何处理:使用新的 Ruby 1.9 哈希语法?
我知道 :allow_sites => 出错了,但是当我将其更改为:
allow_sites: %w'(twitter facebook google_plus linkedin pinterest)'
它实际上不会显示twitter 和pinterest。有点疯狂。
我用过这个gem。您可以像下面这样使用: