Skip to content

Releases: rubocop/rubocop-rails

RuboCop Rails 2.7.0

20 Jul 16:18
Compare
Choose a tag to compare

New features

Bug fixes

  • #261: Fix auto correction for Rails/ContentTag when content_tag is called with options hash and block. (@fatkodima)

Changes

  • #263: Change terminology to ForbiddenMethods and AllowedMethods. (@jcoyne)
  • #289: Update Rails/SkipsModelValidations to register an offense for insert_all, touch_all, upsert_all, etc. (@eugeneius)
  • #293: Require RuboCop 0.87 or higher. (@koic)

RuboCop Rails 2.6.0

08 Jun 06:47
Compare
Choose a tag to compare

New features

Bug fixes

  • #12: Fix a false positive for Rails/SkipsModelValidations when passing a boolean literal to touch. (@eugeneius)
  • #238: Fix auto correction for Rails/IndexBy when the .to_h invocation is separated in multiple lines. (@diogoosorio)
  • #248: Fix a false positive for Rails/SaveBang when update is called on ENV. (@eugeneius)
  • #251: Fix a false positive for Rails/FilePath when the result of Rails.root.join is interpolated at the end of a string. (@eugeneius)
  • #91: Fix Rails/UniqBeforePluck to not recommend using uniq in ActiveRecord::Relations anymore since it was deprecated in Rails 5.0. (@santib, @ghiculescu)

Changes

  • #233: (BREAKING) Drop support for Ruby 2.3. (@koic)
  • #236: (BREAKING) Drop support for Rails 4.1 or lower. (@koic)
  • #210: Accept redirecto_to(...) and return and similar cases. (@koic)
  • #258: Drop support for RuboCop 0.81 or lower. (@koic)

RuboCop Rails 2.5.2

09 Apr 10:40
Compare
Choose a tag to compare

Bug fixes

  • #227: Make Rails/UniqueValidationWithoutIndex aware of updating db/schema.rb. (@koic)

RuboCop Rails 2.5.1

02 Apr 11:00
Compare
Choose a tag to compare

Bug fixes

  • #213: Fix a false positive for Rails/UniqueValidationWithoutIndex when using conditions. (@sunny)
  • #215: Fix a false positive for Rails/UniqueValidationWithoutIndex when using Expression Indexes. (@koic)
  • #214: Fix an error for Rails/UniqueValidationWithoutIndexwhen a table has no column definition. (@koic)
  • #221: Make Rails/UniqueValidationWithoutIndex aware of add_index in db/schema.rb. (@koic)

Changes

  • #223: Mark Rails/ApplicationController, Rails/ApplicationJob, Rails/ApplicationMailer, and Rails/ApplicationRecord as unsafe autocorrect. (@hoshinotsuyoshi)

RuboCop Rails 2.5.0

23 Mar 15:41
Compare
Choose a tag to compare

New features

  • #197: Add Rails/UniqueValidationWithoutIndex cop. (@pocke)
  • #208: Add new Rails/IndexBy and Rails/IndexWith cops. (@djudd, @eugeneius)
  • #150: Add EnforcedStyle: refute for Rails/RefuteMethods cop. (@koic)

Bug fixes

  • #180: Fix a false positive for HttpPositionalArguments when using get method with :to option. (@koic)
  • #193: Make Rails/EnvironmentComparison aware of Rails.env is used in RHS or when != is used for comparison. (@koic)
  • #205: Make Rails/ReversibleMigration aware of :to_table option of remove_foreign_key. (@joshpencheon)
  • #207: Fix a false positive for Rails/RakeEnvironment when using Capistrano. (@sinsoku)

RuboCop Rails 2.4.2

26 Jan 07:47
Compare
Choose a tag to compare

Bug fixes

  • #184: Fix Rake/Environment to allow task with no block. (@hanachin)
  • #122: Fix Exclude paths that were not inherited. (@koic)
  • #187: Fix an issue that excluded files in rubocop-rails did not work. (@sinsoku)
  • #190: Fix Rails/SaveBang when return value is checked immediately. (@jas14)

RuboCop Rails 2.4.1

25 Dec 06:37
Compare
Choose a tag to compare

Bug fixes

  • #170: Make Rails/BulkChangeTable not suggest combining methods with an intervening block. (@mvz)
  • #159: Fix autocorrect for Rails/EnumHash when using % arrays notations. (@ngouy)

Changes

  • #166: Add db/schema.rb and bin/* to the excluded files. (@fidalgo)

RuboCop Rails 2.4.0

27 Nov 04:38
Compare
Choose a tag to compare

New features

  • #123: Add new Rails/ApplicationController and Rails/ApplicationMailer cops. (@eugeneius)
  • #130: Add new Rails/RakeEnvironment cop. (@pocke)
  • #133: Add new Rails/SafeNavigationWithBlank cop. (@gyfis)

Bug fixes

  • #120: Fix message for Rails/SaveBang when the save is in the body of a conditional. (@jas14)
  • #131: Fix an incorrect autocorrect for Rails/Presence when using [] method. (@forresty)
  • #142: Fix an incorrect autocorrect for Rails/EnumHash when using nested constants. (@koic)
  • #136: Fix a false positive for Rails/ReversibleMigration when using change_default with :from and :to options. (@sinsoku)
  • #144: Fix a false positive for Rails/ReversibleMigration when using change_table_comment or change_column_comment with a :from and :to hash. (@DNA)

Changes

  • #156: Make Rails/UnknownEnv cop aware of Rails.env == 'unknown_env'. (@pocke)
  • #141: Change default of EnforcedStyle from arguments to slashes for Rails/FilePath. (@koic)

RuboCop Rails 2.3.2

01 Sep 02:07
Compare
Choose a tag to compare

2.3.2 (2019-09-01)

Bug fixes

  • #118: Fix an incorrect autocorrect for Rails/Validation when attributes are specified with array literal. (@koic)
  • #116: Fix an incorrect autocorrect for Rails/Presence when else branch of ternary operator is not nil. (@koic)

RuboCop Rails 2.3.1

26 Aug 05:25
Compare
Choose a tag to compare

Bug fixes

  • #104: Exclude Rails-independent bin/bundle by default. (@koic)
  • #107: Fix style guide URLs when specifying rubocop --display-style-guide option. (@koic)
  • #111: Fix an incorrect autocorrect for Rails/Presence when method arguments of else branch is not enclosed in parentheses. (@koic)