Fix symbolize_keys deprectation warning
DEPRECATION WARNING: Method symbolize_keys is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.ht ml (called from csv_params at /home/travis/build/consul/consul/app/helpers/budgets_helper.rb:15)
This commit is contained in:
@@ -12,7 +12,8 @@ module BudgetsHelper
|
||||
end
|
||||
|
||||
def csv_params
|
||||
csv_params = params.clone.merge(format: :csv).symbolize_keys
|
||||
csv_params = params.clone.merge(format: :csv)
|
||||
csv_params = csv_params.to_unsafe_h.map { |k, v| [k.to_sym, v] }.to_h
|
||||
csv_params.delete(:page)
|
||||
csv_params
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user