Written content to help you along your web development journey, without forgetting to have some fun along the way.
There are lots of different ways to move "if" statements in CoffeeScript into multiple lines. Pick the one you like the best!
A new operating system means taking a few minutes to upgrade Homebrew. Here is how I went through the process.
It's annoying to shut down and start up your Rails server when jumping between projects. Learn how to run multiple servers at the same time.
Rails 4.1 introduced the ability to preview email messages from your mailers without sending an email. Learn how ...
Rails' scopes don't work well with virtual attributes since they resolve to a SQL query. Instead you can throw them in an array and then sort by a virtual attribute.
It's nice and easy to reverse a ruby array. See how to easily convert a hash as well.
How to maintain HMT behavior on a polymorphic association.
Sometimes metadata isn't available. Other times you don't want to rely on it. Here's a method for finding related content using term frequency / inverse document frequency.
You can add JavaScript and CSS files to your master page if you want to overwrite some default styles or add some functionality via a new script.
When you can't use a JavaScript or CSS concatenater, this method can be useful for adding scripts and styles to your site on the fly.