Skip to content

Releases: rubocop/rubocop-rails

RuboCop Rails v2.34.2

29 Nov 08:15

Choose a tag to compare

Changes

  • #1565: Make Rails/Presence allow index access methods. (@koic)

RuboCop Rails v2.34.1

24 Nov 07:46

Choose a tag to compare

Bug fixes

  • #1556: Fix an error for Rails/Env when assigning Rails.env. (@koic)
  • #1557: Fix false positives for Rails/Presence with comparison and assignment operators. (@davidenglishmusic)
  • #1558: This PR fixes incorrect autocorrect for Rails/RedirectBackOrTo when additional options as double splat are used. (@koic)
  • #1561: Fix incorrect autocorrect for Rails/RedirectBackOrTo when fallback_location argument is a hash and the call has no argument parentheses. (@koic)

RuboCop Rails v2.34.0

16 Nov 07:35

Choose a tag to compare

New features

  • #1520: New Rails/HttpStatusNameConsistency cop. (@tuxagon)
  • #1376: Add new Rails/Env cop. (@cdudas17)
  • #1541: Add new Rails/RedirectBackOrTo cop to suggest using redirect_back_or_to instead of redirect_back with fallback_location. (@davidenglishmusic)

Bug fixes

  • #1539: Fix an error in Rails/ActionControllerFlashBeforeRender when flash is used inside a block followed by method chaining. (@koic)
  • #1553: Fix false positives for Rails/OutputSafety when using non-interpolated multiline heredoc. (@koic)
  • #1532: Fix false positives for Rails/FindByOrAssignmentMemoization when assigning a memoization instance variable at initialize method. (@koic)
  • #1549: Fix Rails/InverseOf cop false positives when using dynamic association options. (@viralpraxis)

Changes

RuboCop Rails v2.33.4

27 Sep 06:27

Choose a tag to compare

Bug fixes

  • #1530: Fix an incorrect autocorrect for Rails/FindByOrAssignmentMemoization when using endless method definition. (@koic)
  • #1522: Fix an error for Rails/FindBy when where takes a block. (@earlopain)
  • #1182: Fix a false positive for Rails/ActionControllerFlashBeforeRender when flash is called in a block. (@5hun-s)

RuboCop Rails v2.33.3

13 Aug 15:19

Choose a tag to compare

Bug fixes

  • #1516: Fix wrong autocorrect for Rails/FindByOrAssignmentMemoization. (@earlopain)

RuboCop Rails v2.33.2

13 Aug 08:46

Choose a tag to compare

Bug fixes

  • #1488: Fix an error for Rails/ReadWriteAttribute with a frozen string attribute name. (@viralpraxis)

RuboCop Rails v2.33.1

11 Aug 22:52

Choose a tag to compare

Bug fixes

  • #1508: Fix an error for Rails/TransactionExitStatement when transaction is part of a method chain. (@earlopain)
  • #1510: Fix Rails/OrderArguments cop false positives when using column index argument. (@viralpraxis)
  • #1511: Don't register offenses for Rails/WhereExists when exists? is given multiple or splat arguments. (@lovro-bikic)

RuboCop Rails v2.33.0

10 Aug 03:27

Choose a tag to compare

New features

Bug fixes

  • #1497: Fix bugs in Rails/PluckId and Rails/PluckInWhere. (@r7kamura)
  • #1478: Fix a false negative for Rails/EnvLocal when having preceding conditions. (@fatkodima)
  • #1505: Fix false negatives for Rails/Pluck when map method call is used in a block without a receiver. (@koic)
  • #1486: Fix false positives for Rails/Output when p method is a DSL. (@koic)
  • #1495: Fix false positives for Rails/TransactionExitStatement when break is used in loop in transactions. (@koic)
  • #1483: Fix autocorrection error when Rails/IndexWith has nested offenses. (@lovro-bikic)

Changes

  • #1500: Exclude controllers and mailers from Lint/UselessMethodDefinition. (@r7kamura)
  • #1474: Make Rails/EnumSyntax include the lib directory by default. (@koic)
  • #1463: Mark Rails/IndexWith as unsafe autocorrect. (@tejasbubane)

RuboCop Rails v2.32.0

17 May 13:42

Choose a tag to compare

Bug fixes

  • #1475: Fix Rails/TimeZone cop error on invalid string literal encoding. (@viralpraxis)
  • #1477: Fix an error for Rails/SchemaComment when the comment is passed as a local variable. (@earlopain)

Changes

  • #234: Use globs that are compatible with Engine or Packwerk. (@tdeo)

RuboCop Rails v2.31.0

01 Apr 02:48

Choose a tag to compare

New features

  • #1471: Support it block parameter in Rails cops. (@koic)

Bug fixes

  • #1465: Avoid warnings about methods of RuboCop::Cop::EnforceSuperclass being redefined. (@davidrunger)