Make remove marker label parameter optional

We were passing `nil` in some calls, which was confusing.

Since now we've got two optional parameters, we're using named
parameters.
This commit is contained in:
Javi Martín
2023-03-07 18:10:33 +01:00
parent aa5f5235de
commit e00aa807b9
6 changed files with 6 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ class Shared::MapLocationComponent < ApplicationComponent
attr_reader :parent_class, :remove_marker_label, :investments_coordinates
delegate :map_location_input_id, to: :helpers
def initialize(map_location, parent_class, remove_marker_label, investments_coordinates = nil)
def initialize(map_location, parent_class, remove_marker_label: nil, investments_coordinates: nil)
@map_location = map_location
@parent_class = parent_class
@remove_marker_label = remove_marker_label