I created the bones of an app for adding, viewing, updating, deleting, and searching for lost and found pets. One of the features I implemented was a geolocating feature. In this blog I will Go over the basic setup for this.
I had some trouble at first figuring out how to use Handlebars with Rails’ ActiveModel::Serializer. Watching this video helped me get started. But beside from that, my googling efforts were little help to me. So from start to finish, here is what I ended up doing:
This is a quick demonstration of creating a custom attribute for Rails’ very useful ActiveModel::Serializer implementation
As mentioned in the previous post, there’s a method I call in my People controller called persist_relationships:
Here is how I built my form/controllers for my family tree app: