As part of my second assessment with Learn.co, I was tasked with creating a simple web app using Sinatra and ActiveRecord. I wanted to make something usable in my day to day job, so I decided to create a loan management system to help track the different aspects of an SBA 504 loan.
One of the requirements was that users can only modify the content that they create. This doesn't really match the way that LMS systems work at my type of business, but I included it to pass the assessment. When I revise this project to put it into use, I will most likely replace this feature with one that simply updates a "last user" variable.
Putting the app together was quite straightforward since I had made several other Sinatra apps during the course of the program. The biggest issue I had was actually setting the initial program to run with the correct dependencies. I realzied that simply deleting the Gemfile.lock and created databases was the easiest approach to configuration. I am also a little unsure of where to insert Rack::Flash as it doesn't seem to work when I put it in config.ru. I put it in the ApplicationController class, which seems to work fine, but I'm not sure if this is convential.
I felt comfortable enough after creating the app to create a layout.erb with css styling. Adding the css styling was very difficult because I couldn't figure out how the app would read the css files. I did a bunch of research but most of it was very contradicting and didn't work for my application. Eventually, I got it working by putting the css files in a subfolder of public called styles. While this worked, I would have thought that putting it in a subfolder called css would work too, but it didnt.
I'm pretty happy with how the app came out, but I would like to add more features once I learn Javascript, such as being able to sort the lists of entities and loans.