Ruby-on-Rails

Generic ActionMailers make Rails e-mails easy

A few months ago I was getting fed up of having to create new ActionMailers from scratch on my Rails applications, so I decided to come up with a 'generic' way to cover all the bases. Instead of creating multiple mailers, you create a single mailer and append generic methods. The content goes to the regular RHTML files and you send through whatever you want from your controllers. See Simplifying ActionMailer development in Ruby on Rails. There's probably a lot that could be done to it now, but it works great for me.

Read more →

undo_helper: Add ‘Undo’ to your Rails application

The creator of co.mments, Assaf Arkin, a Rails developer, has created a plugin that makes it easy to add a Undo feature to your Rails app. Instead of warning users about things simply let them do it, but give them the choice to undo afterwards. Assaf's plugin doesn't cover all the bases, but it's easy to build upon for creating your own system. For deletion, for example, you'd want to come up with a way to keep the data floating around for a while.

Read more →

Mega Ruby on Rails Reference

This is a "short" Ruby on Rails reference. It's goal is to give you an overview over the most used functions / methods / classes. It's not a tutorial, but as a handy guide when you already know your way around.

Read more →

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 →