Elsewhere

Providing context for Rails’ controller action

There are many scenarios where you might want the same controller action / method in your Rails application to perform multiple functions. For example, a wizard with multiple steps or a single form with multiple-stage AJAX calls. What you want to do is provide a 'context' to the specific request and have the controller handle that in some different way.

Read more →

RaPT: A Better Plugin Manager for Rails

Geoffrey Grosenbach introduces the RaPT Plugin Manager for Rails, the answer to the problem of slow plugin installation. Installable as a gem (gem install rapt), RaPT caches the locations of different plugins so that installation is quick and easy. Future plans include developing a central plugin repository, auto-announcement of self-developed plugins, and automatic plugin upgrading. If you want the files direct, check out the Rubyforge project site for RaPT.

Read more →

Testing for Rails Helpers

You can test your controllers, your models, and, well, most of your application, but till now there hasn't been a way to explicitly test your Rails application's helpers. Now there's a solution.. the helper_test plugin (with source and instructions).

Read more →

MeantimeFilter: Wrap your Rails controller actions with scopes

MeantimeFilter is an interesting new plugin for Rails by Roman Le Negrate. It's a little like around_filter, but rather than using a class with 'before' and 'after' methods, it uses a single method (like the other types of filter) and passes in the method to wrap 'around' as a code block. You can then yield to this or pass it into anything you like. An example:

Read more →