Rails Mod

Capsule Coding
Nov 17, 2020

--

The feeling of learning how to adequately use time to learn rails had helped me a bunch this mod. Rails was similar to Sinatra however also very more in depth. For example rails routes can be viewed as the subway system for the mvc to send and receive information. Routes can also be used with nested routes. If we look at our models, we see that a barber has_many :appointments and an appointment belongs_to :barber . We also have client has_many: appointments and an appointment belongs_to :client. Understanding how this worked took a lil bit more than effort but I definitely am able to understanding how each works in accordance with the other..

Another concept that Rails had thrown my way was the build method. It basically does exactly what it sounds like it does. It builds on top of whatever class you put it in. For example if i wanted to create another of the same object in the same block. All i would need to do is add the build method to achieve this. The build method however has a flaw, as does everything in this life. It does not save. So be weary of any build method you use and how you implement it.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Capsule Coding
Capsule Coding

No responses yet

Write a response