Skip to content

Commit

Permalink
Merge pull request #80 from rmm5t/fix-rubocop-cop-rails-const-defined
Browse files Browse the repository at this point in the history
[Fix #79] Rubocop::Cop::Rails constant removal
  • Loading branch information
koic authored Jun 25, 2019
2 parents 4712f51 + da9759b commit 4f6f204
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Bug fixes

* [#43](https://github.com/rubocop-hq/rubocop-rails/issues/43): Remove `change_column_null` method from `BulkChangeTable` cop offenses. ([@anthony-robin][])
* [#79](https://github.com/rubocop-hq/rubocop-rails/issues/79): Fix `RuboCop::Cop::Rails not defined (NameError)`. ([@rmm5t][])

### Changes

Expand All @@ -27,3 +28,4 @@
[@andyw8]: https://github.com/andyw8
[@buehmann]: https://github.com/buehmann
[@anthony-robin]: https://github.com/anthony-robin
[@rmm5t]: https://github.com/rmm5t
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rails_cops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
# RuboCop included the Rails cops directly before version 1.0.0.
# We can remove them to avoid warnings about redefining constants.
module Cop
remove_const('Rails') if const_defined?('Rails')
remove_const('Rails') if const_defined?('Rails', false)
end
end

Expand Down

0 comments on commit 4f6f204

Please sign in to comment.