From eddf3febd7e78a442a0b2fbd36d7b92ba769f4a5 Mon Sep 17 00:00:00 2001 From: blackst0ne Date: Sun, 8 Apr 2018 15:35:30 +1100 Subject: [Rails5] Add `safe_params` helper 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. https://github.com/rails/rails/pull/20868 --- app/controllers/groups_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/groups_controller.rb') diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 283c3e5f1e0..a03612b9916 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -187,6 +187,6 @@ class GroupsController < Groups::ApplicationController params[:id] = group.to_param - url_for(params) + url_for(safe_params) end end -- cgit v1.2.3