From 5918033a0013a2303307ff1d10866e5592a689a5 Mon Sep 17 00:00:00 2001 From: Template Bot Date: Sat, 28 Nov 2026 03:09:48 +0000 Subject: [PATCH] Require hash shorthand syntax **What** Set `Style/HashSyntax` to `EnforcedShorthandSyntax: always` and auto-fix the three places that used the long form. **Why** The default, `either`, allows both `{ x: x }` and `{ x: }`, so the style was mixed across the codebase. Source: https://github.com/mockdeep/Rails-Template/pull/1556 --- .rubocop.yml | 1 + spec/system/feeds_index_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7ac993ad9..cdb2b5b26 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -45,6 +45,7 @@ RSpec/MultipleMemoizedHelpers: Exclude: - spec/linters/rubocop/**/*.rb Style/ClassAndModuleChildren: { EnforcedStyle: compact } +Style/HashSyntax: { EnforcedShorthandSyntax: always } Style/MethodCallWithArgsParentheses: AllowedMethods: - and diff --git a/spec/system/feeds_index_spec.rb b/spec/system/feeds_index_spec.rb index 8c5aa8339..c55018beb 100644 --- a/spec/system/feeds_index_spec.rb +++ b/spec/system/feeds_index_spec.rb @@ -31,7 +31,7 @@ it "removes stories from news when a feed is deleted" do login_as(default_user) feed = create(:feed) - create(:story, feed: feed, title: "Gone Story") + create(:story, feed:, title: "Gone Story") visit("/feeds") click_on "Delete"