-
-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert params.permit
to params.expect
#5357
Conversation
Use params[:id] for params in path
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5357 +/- ##
=======================================
Coverage 97.14% 97.14%
=======================================
Files 458 458
Lines 9584 9584
=======================================
Hits 9310 9310
Misses 274 274 ☔ View full report in Codecov by Sentry. |
statements_attributes: [[ | ||
:effect, | ||
principal: :oidc, | ||
conditions_attributes: [%i[operator claim value]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @segiddins this line doesn't fail any tests either way, but it looks like this is how the code works. I guess we don't pass conditions in a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible
@@ -39,7 +39,7 @@ def in_audited_transaction(auditable:, admin_github_user:, action:, fields:, arg | |||
changes = merge_changes!(changes, record.attributes.slice("id").transform_values { [_1, _1] }) if changes.key?("id") | |||
changes = merge_changes!(changes, record.attributes.compact.transform_values { [_1, nil] }) if record.destroyed? | |||
|
|||
[key, { changes:, unchanged: record.attributes.except(*changes.keys) }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop side-effect. Not related to this change but necessary to keep lint passing (while also improving how expect syntax is used)
Yay! 😀