Articles

Our latest writings on software development and design.

Minifying Your Rails Javascript

The Javascript libraries that ship with Rails are extremely useful, but have a significant filesize footprint. Writing a simple Rake task to minify our Javascript files using JSMin provides a way cut down the size of your Javascript code before deploying your Rails application.

Testing Javascript in Rails

While performing unit and functional tests are expected in any good Rails application, testing Javascript often falls to the wayside. If you have been looking for an elegant solution to testing your Javascript code, the Test.Unit component of Scriptaculous is your answer.

Custom Rescue Templates for Rails

The Ruby on Rails error screens can be easily customized to a different style or to show application-specific data. This tutorial shows how to do it. Featured on the Ruby on Rails Weblog.

Creating Classes with Prototype

The Prototype library helps improve the readability of Javascript code by adding a syntactic sugar for creating objects. This syntax organizes Javascript's unfamiliar prototype-based inheritance scheme in a pattern that is more common to programmers coming from Ruby, PHP, or Java.