wide-art-99889
04/12/2023, 7:21 PMfield :coordinates, as: :location, stored_as: [:latitude, :longitude]
(I already had latitude and longitude attributes on the model)
3. Add def coordinates
and def coordinates=()
methods to my model class.
4. Add the mapkick
gem to my rails application.
When I visit the show page for one of the so-modified resources, I expect to see a map on the page. Instead, I see the following error:
undefined method `js_map' for #<Avo::Fields::LocationField::ShowComponent:0x00000001173d99c0 @compact=false, @field=#<Avo::Fields::LocationField:0x00000001302b5288 @show_on_index=false, @show_on_show=true, @show_on_new=true, @show_on_edit=true, @id=:coordinates, @name=nil, @translation_key=nil, @block=nil,
I took most of my inspiration from looking at the changes made to the dummy app in the commit, so I'm not sure what else I need to do for the js_map
method from the gem to be available within avo.lemon-wall-20836
04/13/2023, 4:51 AMlemon-wall-20836
04/13/2023, 5:01 AMmapkick-rb
in your Gemfile
. mapkick
is a different gem.lemon-wall-20836
04/13/2023, 5:01 AMincalculable-psychiatrist-85460
04/13/2023, 7:39 AMlemon-wall-20836
04/13/2023, 7:39 AMwide-art-99889
04/13/2023, 1:57 PMwide-art-99889
04/13/2023, 2:00 PMmapkick-rb
gem, and I was able to view the map on a resource show page. 💯lemon-wall-20836
04/13/2023, 2:43 PMmapkick
in my gemfile too 😛