Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlanMaik
Copy link
Contributor

@AlanMaik AlanMaik commented Dec 1, 2020

No description provided.

@@ -23,14 +23,16 @@ def identifier
params[resource.identifier]
end

def member_params
def member_params # rubocop:disable Metrics/AbcSize
Copy link

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).

params
.permit(resource.request_attributes.keys)
.merge(
params
.require(resource.resource_name)
.permit!
)
rescue StandardError
params.permit(resource.request_attributes.keys)
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created the Issue: #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants