fdreith.github.io


Using JS Date Objects in React-Redux with Rails Backend


I built a task app that allows users to create tasks and assign them to other users. To create a due date for tasks I used the react-datepicker package https://www.npmjs.com/package/react-datepicker. This allows users to pick a date from a calendar.


Using Associations and Serializers to Make Code More Efficient

When building my first javascript frontend with a rails backend, I thought it would make the most sense to have the database be the source of truth for my data. That way when a user added data, or deleted data (in this case a journal entry) I would simply have to grab data from that one model in the database and nothing else, and not have to worry about updating the frontend.


Using Scopes to Filter an Index Page

While building my project I made the mistake of writing my scope methods after I was half way finished. I assumed I would be using it for additional functionality that would be easy to add on to a close to finished project, so I built the basic structure first. Once I started building my scope methods I saw how they can handle essential functions of my application.


Sinatra Associations and Joins Table

For my Sinatra portfolio project I built a pet app that helps with communication between individuals who have shared responsibility of a pet, or multiple pets in the household. This could be family, significant others, roommates, a nanny, dog walker, etc. Based on the different scenarios it made the most for the pet to belong to the household, and the household to have many users. The users would also need to have many households.


Ruby Attribute Writers and Readers

Instance variables, denoted with a @ symbol, allow you to access information about the instance outside the scope of one particular method, within the scope of the instance. The purpose of an attribute writer method is to be able to assign local variables to an instance variable, and the purpose of an attribute reader method is to access the value of that instance variable.