The forum set up for the Rails Recipes book has a section where readers can write their own Rails recipes. Some of them are pretty good and would have been good contenders for the book. Here are some of them:
A few days ago I learned about Curvy Corners, an incredible JavaScript that lets you put rounded corners on your DIV elements that can do anti-aliasing and handle any size border. It's the best rounded corner script so far.
Rail Mail is a Rails plugin by Scott Fleckenstein that stores copies of any mail that your Rails application sends, and provides an interface to view it.
Aidan Finn has written what may be the most comprehensive walkthrough of developing an authentication system in Rails. He starts from the migrations and covers every step of the process, right through to the tests. If you want to see how a Rails developer produces an entire block of functionality from start to finish, this is worth reading.
RailsTidy is a plugin for Rails, by Damien Merenne, which validates your RHTML templates, the HTML output from your functional tests, and tidies up the HTML generated by Rails.
Settings is a new plugin for Rails that lets you have a basic hash of 'settings' or configurations for your application without having everything hardcoded. Example:
RailsHelp.com has possibly the simplest homepage in the world. Just type in what you're searching for, and off you go. It's a nice change to digging through the regular API documents.
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.
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.
An oldie but a goldie.. Kent Siblev had an issue with his Rails application ballooning to 150 megabytes of memory usage per process. He couldn't figure out where the problem was, so he wrote a small plugin called MemoryLogging to check memory usage on each request (Linux only, I'm afraid). He found his problem within minutes and explains what was going on.
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.
Stuart Halloway and Justin Gehtland of Relevance LLC have put together an online presentation called AJAX on Rails. It looks at AJAX, its relation to Rails, how Prototype works, and provides lots of great code examples. If you want to brush up on your whole AJAX and Rails knowledge, it's worth looking at. A PDF version is also available.
Another new article in Bruce's series shows you how to get DOM-friendly IDs from ActiveRecord. This is a solution nearly all Rails developers have implemented at some time or another:
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:
Kevin Clark looked at his options for testing his RJS (Javascript templates for Rails) templates but wasn't happy with the limited options, so he rolled his own testing system as a Rails plugin. It's called ARTS (Another RJS Testing System) and is available here. It's pretty neat, and if your app uses a lot of RJS templates, you're going to want it. Here's an example of a test using ARTS:
Tobias Lütke needed to migrate a database from one architecture to another but needed to copy the data across intact. To ensure that the format would be architecture agnostic, he's created a plugin that dumps the data to YAML and then reloads it back into the database at the other end. It's a simple rake task, and Tobi gives quick and easy instructions.
Rodney, the Pin Up Geek, has set out to demystify the routing system in Ruby on Rails. He provides lots of basic code examples and shows you how to use most of the features of routes, like in this example of a requirements based route that only routes when a postal code is included in the URL:
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: