Abraham Diaz
2 min readAug 26, 2021

Javascript Project

Javascript was really difficult for me to understand at first but again once we started the project it started making way more sense. After starting with the idea to make an API of Force users from star wars it was really easy for me. I also started a week early.

The first issue I had when I started was when I was trying to get my seeded data to show up. I got the user data to show up but the abilities wouldn’t. But after getting help I realized it was something small. I could have just displayed the abilities through associations by putting this.ability. So once I got that working it would display the ability object so I just changed it from what I had before to this.ability.name.

The next thing I did was make the delete button and that was a quick thing to add. After I got that done I wanted to make the new form pop up over the screen but I thought it would be really complicated. I asked our cohort lead and they told me that what I wanted to do was called a modal. Then from there I was able to make it and I was able to get it to display after clicking a button.

Once I started working on the form it was really easy to do. The one thing I had to figure out was how to do a drop down menu. This was one of the last things I needed to do for my project. I was able to iterate over all the abilities to create an option tag for the dropdown menu. Then the final issue I had is when I submitted the new form it would say that there was no name attribute associated with the id of the abilities in the dropdown menu. When I got help from my cohort lead we found that the association that I made at the start of the project had a different attribute name than the one I tried using. I had put ability.name when I needed to put force_ability.name. Once I fixed that I was able to finish my project.

No responses yet