I’m exhausted tonight. Been working mainly on more Active Record associations. More complex ones than before I would assume to get in practice for later labs. Foreign key and Class Name Active Record class methods to be exact if you’re looking for some light reading lol.
I attended an Alumni career fair at my alma matter Belmont University today which was interesting. I never attended one as an undergrad so the whole, drop your resume off on as many tables as possible, was lost on me.
Watching Avi build out the TodoMVC is an interesting thing and I’m happy I get to do it as part of my curriculum and showing what Rails does. That was the bulk of the new work I did tonight. Something that I ran into during my Sinatra project was getting all my associations to work properly. I had issues because of what I now know is called the Active Record Inflector.
Not much going on but completing a couple larger labs tonight. One significant things that halted me for a while was an issue in my strong params. I had:
def song_params params.permit(:title, :released, :release_year, :artist_name, :genre) end Which looks really nice but doesn’t take into account that I’m using form_for and thus my submitted data is actually a nested hash. A quick change to:
def song_params params.require(:song).permit(:title, :released, :release_year, :artist_name, :genre) end Had me moving along again.
I can happily say that I got zero, yes 0 coding done today. Well I guess I got a little in during my 45 minutes Sinatra Project review this morning. Which was a great review btw.
Hi Seth,
Awesome job on your Sinatra Project!! You did a great job, and I really appreciate your work on the Active Record relationships and your clean and concise code. As you move forward these practices will help you a lot.
So that intense lab I was talking about yesterday… it took no time at all because of Rails. It was AWESOME. One of the things I learned today that is going to make life easier and ensure DRY.