Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Jul 8, 2024
1 parent 9ca650f commit eda9ff4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/components/avo/index/resource_map_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def resource_location_markers
coordinates[:latitude].present? && coordinates[:longitude].present?
end

return records_markers if map_options[:extra_markers].nil?

records_markers + Avo::ExecutionContext.new(target: map_options[:extra_markers]).handle
end

Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/app/avo/resources/city.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Avo::Resources::City < Avo::BaseResource
tooltip: record.name
}
},
custom_markers: -> do
extra_markers: -> do
[
{
latitude: params[:lat] || 37.780411,
Expand Down

0 comments on commit eda9ff4

Please sign in to comment.