-
Notifications
You must be signed in to change notification settings - Fork 2
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
WIP - Add for rescue it is possible to add attributes that do not exist in the model #54
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,14 +23,16 @@ def identifier | |
params[resource.identifier] | ||
end | ||
|
||
def member_params | ||
def member_params # rubocop:disable Metrics/AbcSize | ||
params | ||
.permit(resource.request_attributes.keys) | ||
.merge( | ||
params | ||
.require(resource.resource_name) | ||
.permit! | ||
) | ||
rescue StandardError | ||
params.permit(resource.request_attributes.keys) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need a solution that prevents the error from happening instead of rescuing. Please give instructions on how to reproduce the issue and let's find another way to solve the problem in the current project that needs this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I created the Issue: #55. |
||
end | ||
|
||
def new_member | ||
|
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.
how about we disable this for the project?
these ad-hoc rubocop disable reduce legibility and don't help with keeping the code standards (one of rubocop main purposes).