Five great tricks with Rails views

Bruce Williams has a great set of articles going on on his blog called "Rails Views". Each one looks at a different aspect of Rails' views and templates system and how you can use it in a cool or different way. You are bound to learn something or come up with some ideas on how to make your views more efficient (I sure have!). Here are some of the recent posts in the series:

Read more →

HTTP Authentication plugin for Rails

People who are considering Rails as a platform often ask what it's integration with tools like HTTP authentication are like, often because that's the way they're currently solving certain problems. Up till now HTTP authentication has been something you've had to implement yourself, but now there's a plugin. Install it like so:

Read more →

GemJack: Online HTML documentation for all gems

GemJack.com is a basic, but highly effective, site featuring full HTML documentation for most of the Ruby gems (Ruby's library packaging system). Hopefully it'll get indexed by Google in full and beginners will find it easier to find the documentation they want straight from Google.

Read more →

Asset Management with Ruby DSLs

Jeremy Voorhis has written an interesting, and seemingly overlooked, article about asset management in Ruby and Rails. Firstly he talks about using rake to build a basic asset compiler, and then demonstrates a basic DSL (Domain Specific Language) he created to manipulate image assets in only a few lines of code. An example:

Read more →

PX: A quick and silly Ruby obfuscation system

For the fun of it, I developed a quick Ruby obfuscation tool a few weeks ago. It's not a proper obfuscater that changes variable names and such, but it'll keep your code from being immediately understood. Here's the library, px.rb:

Read more →