August 13, 2015 Log No. 332

AR = Advanced Reality?

(Yeah I’m going to keep going with these)

So more ActiveRecord today! Actually now I think I kinda got the hang of it: all I had to do was blindly accept ActiveRecord into my heart and believe, and so it was! Also it helped that I was finally enlightened to the .select/.joins/.group/what-have-you SQL-like methods in last night’s readings. I’m just all around enlightened now really.

We built a Polls mini-project, which consisted of some pretty straight-forward associations and validations, and then some more fun optimizations that tried to cut down on the number of individual table calls from Ruby -> SQL. Being able to debug in rails dbconsole is pretty handy and really makes the table data feel more tangible. The only quirky thing that caused some debugging pain was that .joins apparently doesn’t seem to accept ? substitutions like its brethren (why is beyond me) and so has to be string-interpolated…Joins why can’t you be a team player?!

At this point, we’re told that we will be able to code “ActiveRecord Lite” ourselves tomorrow. So just when I have converted to worshipping the one true God AR, we’re going to see behind the curtain. Ha, it was nice while it lasted.


Leave a Reply

Your email address will not be published. Required fields are marked *

*