简体   繁体   中英

Rubocop line is too long and Use new Ruby 1.9 hash syntax

Without adjusting the length in yaml how can I take this line of code down:

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))

Also...how do I deal with: Use new Ruby 1.9 hash syntax?

I know it's erroring with the :allow_sites => but when I change it to:

allow_sites: %w'(twitter facebook google_plus linkedin pinterest)' 

It actually will not display twitter and pinterest. It's kind of crazy.

I had used this gem. You can use like the below:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM