Home

Posts (Page 46)

Written content to help you along your web development journey, without forgetting to have some fun along the way.

Multiple Line "If" Statement in CoffeeScript

There are lots of different ways to move "if" statements in CoffeeScript into multiple lines. Pick the one you like the best!

Oct 29, 2014

Upgrading Homebrew for Mac OS X Yosemite

A new operating system means taking a few minutes to upgrade Homebrew. Here is how I went through the process.

Oct 28, 2014

Run Multiple Rails Servers at the Same Time

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.

Oct 24, 2014

Preview Emails in Rails

Rails 4.1 introduced the ability to preview email messages from your mailers without sending an email. Learn how ...

Oct 23, 2014

Order Rails Query by Virtual Attribute

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.

Oct 22, 2014

How To Reverse a Ruby Hash

It's nice and easy to reverse a ruby array. See how to easily convert a hash as well.

Oct 18, 2014

Rails has_many :through Polymorphic Association

How to maintain HMT behavior on a polymorphic association.

Oct 13, 2014

Related Content (without metadata) in Rails using tf-idf

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.

Oct 12, 2014

Add Custom JavaScript and Stylesheets from SharePoint Master Page

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.

Aug 06, 2013

Dynamically Add JavaScript and CSS Files to Your Website Using JavaScript

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.

Aug 05, 2013