Files
grecia/app/components/map_locations/form_fields_component.rb
Javi Martín 29e5adc233 Move map location fields partial to a component
This way it'll be easier to test it and refactor it.
2025-11-17 15:37:06 +01:00

16 lines
329 B
Ruby

class MapLocations::FormFieldsComponent < ApplicationComponent
attr_reader :form, :map_location, :label, :help
use_helpers :render_map
def initialize(form, map_location:, label:, help:)
@form = form
@map_location = map_location
@label = label
@help = help
end
def render?
feature?(:map)
end
end