Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The intent of this pull request is to add Rails 4.2 support to the library.
Currently, there is one commit on the branch which updates the column option comparisons to use
column_defaults
when comparing the default column value. This is something that Rails did a while ago and has been the public API for getting the default value for some time before that. This change works in all 4.x versions.There is one outstanding issue which is testing for default scopes. Currently, part of the matcher is to generate SQL from
scope.arel.to_sql
and compare it with arelation.arel.to_sql
output. In Rails 4.2.x these values are identical and both contain?
SQL parameter values in them - unlike Rails 4.0 and 4.1 where the values are injected into the string. I'm currently unsure the best way to modify this library to better test for a default query scope.