apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.27k stars 382 forks source link

undefined method `latitude' for #<Lapor:0x007f09e2049708> mongoid #530

Open farihulrouf opened 7 years ago

farihulrouf commented 7 years ago

How to resolving using mongoid ? i ' m too confused here controller class


            if !lapor.hidden?
                lapor_path = view_context.link_to "View Details", lapor_path(lapor), :"data-no-turbolink" => true
                marker.lat lapor.latitude
                marker.lng lapor.longitude
                marker.infowindow "<b>Lapor ##{lapor.id}</b><br>
                                  #{lapor.title}<br>