forked from rubocop/rubocop-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix rubocop#997] Support methods and variables in NotNullColumn
At the NotNullColumn cop if a method or variable is passed as arguments for `add_column` an error is triggerred: ``` NoMethodError: undefined method `value' for s(:send, nil, :string):RuboCop::AST::SendNode ``` In this commit we an extra check to ensure the type has the `value` method implemented, before invoking it.
- Loading branch information
Showing
3 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/fix_not_allow_not_null_to_work_with_methods_and_variables.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#997](https://github.com/rubocop/rubocop/issues/997): Fix to Allow `NotNullColumn` to work with method calls and variables. ([@fidalgo][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters