This is an expansion of the app I made for the Rails assessment, which is an interface for the Manchester Makerspace member database. I expanded on that app by replacing html actions with JQuery actions so that less refreshes are required.
The first step was adding JSON reponses for all my controller actions so that they can interface with api calls made with jquery and ajax. I was required to use Active Model Serialization to render the JSON; I am using MongoDB for the application database so I had to specifically include AcitiveModel::Serializers::JSON in each model to enable this feature. I also set up custom Serializers because there is some Member data that I don't want being passed back to the client.
After I had the routes and controller actions working with JSON, I moved on to the views and JS. I created JS Model Objects of the Ruby models in order to handle formatting and client side data validation. The hardest part of the JS was making sure that JS elements were re-enabled when new data was appened to the page. It would have been more efficient to render html instead of using the JSON to construct html but unfortunately, the requirements of this assessment required using JSON.
The last tasks I tackled did not relate directly to the assignment. First, I used the Whenever gem to set up cronjobs to backup the mongo db and then used the GoogleDrive gem to push that backup to the cloud. The backups were done with custom Rake tasks that run daily. Lastly I set up a simple Socket.io Client to listen to the door authorization system setup at the Makerspace which reads the Card IDs of scanned RFID tags