Skip to content

Require hash shorthand syntax - #1710

Merged
mockdeep merged 1 commit into
mainfrom
template-update/1556
Nov 28, 2026
Merged

mockdeep merged 1 commit into
mainfrom
template-update/1556

Conversation

@rails-template-sync

Copy link
Copy Markdown
Contributor

Template Update

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.

Cherry-picked from mockdeep/Rails-Template#1556

Note

Deleted despite local changes. Each of these was removed on one side and modified on the other, so the deletion was kept. Restore any you still need:

  • spec/lib/route_constraints/admin_constraint_spec.rb
  • spec/support/mocks.rb

Warning

Conflicts were automatically resolved by Claude. Please review these files carefully:

  • .rubocop.yml

**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: mockdeep/Rails-Template#1556
@mockdeep
mockdeep force-pushed the template-update/1556 branch from 7a37014 to 5918033 Compare November 28, 2026 04:40
@mockdeep
mockdeep merged commit 385ca91 into main Nov 28, 2026
4 checks passed
@mockdeep
mockdeep deleted the template-update/1556 branch November 28, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant