Rename map_location variable containing parameters

When it was named `map_location`, I constantly thought it was an object
instead of a hash.
This commit is contained in:
Javi Martín
2023-04-28 17:16:05 +02:00
parent 65ed778226
commit 6105de307b

View File

@@ -167,9 +167,9 @@ class ProposalsController < ApplicationController
end
def destroy_map_location_association
map_location = proposal_params[:map_location_attributes]
map_location_params = proposal_params[:map_location_attributes]
if map_location.blank? || map_location.values.all?(&:blank?)
if map_location_params.blank? || map_location_params.values.all?(&:blank?)
@proposal.map_location = nil
end
end