Instrument Warehouse // Ruby on Rails Project

doosemavis

Moose Davis

Posted on December 5, 2020

Instrument Warehouse // Ruby on Rails Project

Module 3 has been some of the most challenging information I have attempted to digest in the world of technology and software development. Though it was challenging and I have a long way to go until I feel much more confident in the information I use on a day to day basis, I'm so proud of how far I've come in this experience thus far.

Okay, so here's what happened: #storytime

Each month the checklist for our projects have been growing, and this project was not an exception. Here are a few of the things we included:

  • Single and Bi-directional relationships in our models.
  • Defining validations in our models to protect from invalid or harmful data being submitted by the user.
  • Using standard authentication AND in that authentication system allowing the user to login via one 3rd-party (Facebook, Twitter, GitHub, Google, etc etc) if they do not have an account in this created application, or to allow a user to signup/login "regularly".
  • Inclusion of a nested new route, and a nested index or show route while following RESTful URLs conventions.
  • Keeping the code within the application as clean and DRY (Don't-Repeat-Yourself) as possible.
  • Utilizing helper methods and partial forms (when appropriate).
  • Define and use at least one scope method. (I chose to create one to list all instruments heavier than 100lbs. If you're a percussionist, you know how useful this can be knowing how much equipment is heavier than 100lbs. lol.)
  • Use of generators to produce specific components available to use via the rails framework.
  • Customization and production of error messages and correctly displaying any validation errors.

Looking back at the checklist from the curriculum, I can't believe that I have learned so much in 3 months, and on top of that, the terminology that I am able to use to communicate as effectively as I can thus far. This has been such a journey, (with two months left to go!), and there are a lot of points during these months where I think to myself "I'm not understanding this. I'm going to fall behind. I'm gonna have to move to part-time. I don't know if I can do this yet." BUT, when those thoughts begin to creep up, I take a deep breath, step back and think, "wow. I am really doing something amazing here. And have done so much in a short amount of time. Keep going. Trust the process."

Back to the project:

Day 1 - Monday, November 30, 2020

Using rails new to create the project file, then by use of the devise gem, I was able to set up my project EASILY with user authentication. (Thank you to whomever created this gem, lol) Then, by use of some super amazing blogging by a past // Flatiron student, was also able to set up the 3rd-party login/authentication via GitHub super easy as well. (THANK YOU Salma Elshahawy!)

Devise Authentication Guide w/ OmniAuth for Rails App by @salmaeng

Day 2 - Tuesday, December 1, 2020

With my application set up with user authentication and 3rd party login capabilities, I was now able to being thinking about the
relationships I wanted to build for my project.

And settled on these:
Project name: Instrument Warehouse
Project purpose: To allow the user to keep track of instruments they like, play, or have in their day-to-day lives.

class User < ApplicationRecord
  has_many :instruments
  has_many :categories, through: :instruments
end

class Instrument < ApplicationRecord
    belongs_to :user
    belongs_to :category
end

class Category < ApplicationRecord
    has_many :instruments
    has_many :users, through: :instruments
end
Enter fullscreen mode Exit fullscreen mode

As a musician, I figured something like this could be a handy tool to utilize since my previous occupation was a percussionist and having to keep track of HUNDREDS of pieces of equipment.

Day 3 - Wednesday, December 2, 2020

Wednesday was the day I began to get into the nity-grity of the code. Setting up the appropriate views, adding buttons, adding test data to make sure it's functioning properly. (Thank goodness for paired programming when you need a fresh set of eyes or some help from other cohort team members -- THANKS CHRISTINA! )
#EverythingWasBreakingAndWasFreakingOut
#WasOnTheBrinkOfTears
#WasAbleToFixItAndEndOnAGoodNote

Day 4 - Thursday, December 3, 2020

The end of the week was fast approaching and went to both study groups, AND attended a pre-scheduled 30-min session with Nancy (Cohort Leader_090820). Nancy really saved my project so many times this day, haha. My params were acting so funky, and my strong params too. The edit/update & new/create actions were not functioning properly => cue Nancy to the rescue. lol.

Day 5 - Friday, December 4, 2020

And then finally, we approached the final day of office hour days, and ability to code together with some people and get fresh set of eyes when needed quickly. Also had this weird funky thing happening with my scope methods, and again, Nancy came to my rescue.

Once I had full consistent functionality with my project, was able to relax slightly and add some bootstrap styling in order to fine-tune some aesthetics as best as I could muster on a tired brain of coding so vigorously this week. BUT WE DID IT! #goteam

Welcome to the Instrument Warehouse

<body>
    <div class="center">
        <div class="jumbotron bg-info">
            <div class="container">
                <h4 class="display-5 text-center">Welcome to the Instrument Warehouse</h4>

                <h4 class="lead text-center">Please select an option from the navigation bar above</h4>

                <img src="https://wallpaperaccess.com/full/2039813.jpg" class="img-fluid text-center" alt="Responsive image">
            </div>
        </div>
    </div>
</body>
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
doosemavis
Moose Davis

Posted on December 5, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related