Próbuję uzyskać długość i szerokość geograficzną z adresem, ale gdy uruchamiam szyny db: szerokość i długość pobytu nasiona puste, a reszta pól będzie rozstawiony
tutaj jest mój model
attr_accessor :lat, :lng
geocoded_by :address, :latitude => :lat, :longitude => :lng
after_save :geocode, if: ->(building){ building.address.present? }
i mam gem '' w geocoder GemFile
My Rails version 5.0.6
and ruby version 2.4.1
Uwaga: trzeba użyć tylko „geocoder” gem To wszystko, co mam, z góry dzięki













