Skip to content

[Rails5] Add `safe_params` helper

blackst0ne requested to merge blackst0ne-rails5-add-safe-params-helper into master

What does this MR do?

Rails 5.0 requires to explicitly permit attributes when building a URL using current params object.

The safe_params helper allows developers to just call safe_params.merge(...) instead of manually adding permit to every call.

This MR adds the safe_params helper and replaces some calls of params with safe_params to get rails5 tests green.

Not every call of params has been replaced, but only those that have been caught locally by running rails5 tests.

Are there points in the code the reviewer needs to double check?

No.

Why was this MR needed?

Migration to Rails 5.0.

Screenshots (if relevant)

No.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#14286 (closed) and !12841 (closed)

Merge request reports

Loading