{"id":7806,"date":"2015-10-28T05:52:22","date_gmt":"2015-10-28T05:52:22","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/10\/28\/rubocop-align-the-elements-of-a-hash-literal-if-they-span-more-than-one-line-open-source-projects-bbatsov-rubocop\/"},"modified":"2015-10-28T05:52:22","modified_gmt":"2015-10-28T05:52:22","slug":"rubocop-align-the-elements-of-a-hash-literal-if-they-span-more-than-one-line-open-source-projects-bbatsov-rubocop","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/10\/28\/rubocop-align-the-elements-of-a-hash-literal-if-they-span-more-than-one-line-open-source-projects-bbatsov-rubocop\/","title":{"rendered":"Rubocop. Align the elements of a hash literal if they span more than one line-open source projects bbatsov\/rubocop"},"content":{"rendered":"<p>I have some code<\/p>\n<pre><code># Filters\nfilter :name\nfilter :email\nfilter :organization_status, label: 'Status'\nfilter :subscriptions_subscription_status_id,\n       as: :select,\n       label: 'Subscription Status',\n  collection: proc do\n    Organization\n      .includes(subscriptions: [:subscription_status])\n      .map(&amp;:subscriptions)\n      .flatten\n      .map(&amp;:subscription_status)\n      .uniq\n  end\n<\/code><\/pre>\n<p>Rubocop says: Align the elements of a hash literal if they span more than one line.<\/p>\n<pre><code>collection: proc do\n^^^^^^^^^^^^^^^^\n<\/code><\/pre>\n<p>What can I do with it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have some code # Filters filter :name filter :email filter :organization_status, label: &#8216;Status&#8217; filter :subscriptions_subscription_status_id, as: :select, label: &#8216;Subscription Status&#8217;, collection: proc do Organization .includes(subscriptions: [:subscription_status]) .map(&amp;:subscriptions) .flatten .map(&amp;:subscription_status) .uniq end Rubocop says: Align the elements of a hash literal if they span more than one line. collection: proc do ^^^^^^^^^^^^^^^^ What can I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7806","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7806"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7806\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}