Skip to content

Commit

Permalink
Comment(Server Controller): ActionController::Parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisma committed Mar 27, 2019
1 parent d7f8efb commit 006604f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/servers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def server_params
:ipv6_address, :mac_address, :fqdn, {installed_software: []},
:model, :vendor, :description, :responsible_id)
# Remove empty software form fields
# https://api.rubyonrails.org/classes/ActionController/Parameters.html#method-i-each_pair
params[:server].each { |k,v| v.reject!(&:blank?) if k.eql?('installed_software') }
end
end

0 comments on commit 006604f

Please sign in to comment.