Hello? This is your captain Kasper speaking.
We’re just about ready to take to the skies for our weekly cruise through the news. I took a flight course once, and walked away from the crash in flying colors. If my instructor had made it out, I’m sure he would be proud too.
Look at us, we’re already taking off - hey, is that light supposed to be blinking?
26 daring pilots brimmed the horizon with their commits this week. There were loops and barrel rolls galore - you should have been there! Oh, but you can. See the last item if you feel the need for speed (and contributing).
In Rails 5 you’ll see your SQL has gotten a fresh coat of paint - several in fact. Now common SQL statements appear in color when sprouting up in your logs. Check the link for the color map.
Gone are the thrills of remembering past defaults, when you changed it for a column. Both
to can be passed now:
change_column_default(:posts, :state, from: nil, to: "draft")
If all your life’s ROFLMAO’ing have left you with ass left to laugh off, you’ll be ready to migrate and roll back on the floor laughing the remainder of your rear right off over this.
If you’re a Windows user and witness to the horror of
rails new failing with native gems not being able to be installed - rejoice! You need the latest Development Kit version, which our getting started guide will now tell you.
To prevent ambiguity and potential collisions, association names in
where are assumed to reference the table name.
When a Rails 5 controller action have no corresponding template, Rails renders
head :no_content. Before libraries were hooking into the missing template exception being thrown. Now
default_render takes a block and the hook is back.
One More Thing™
From time to time DHH opens issues on Rails about stuff he’d like implemented. As long as someone hasn’t laid claim to it in the comments (or is assigned) it’s yours to take a stab at.
That’s a wrap
That’s all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!
Have you been thinking about writing for us, but you’re scared of putting yourself out there? Don’t worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.
You up for that? Tell Godfrey today.