Files
nairobi/app/helpers/map_locations_helper.rb
Javi Martín 9cc3c553ff Extract component to render a map
This way it'll be easier to refactor it.
2023-05-04 15:27:15 +02:00

14 lines
318 B
Ruby

module MapLocationsHelper
def map_location_available?(map_location)
map_location.present? && map_location.available?
end
def map_location_input_id(prefix, attribute)
"#{prefix}_map_location_attributes_#{attribute}"
end
def render_map(...)
render Shared::MapLocationComponent.new(...)
end
end