Welcome to the sixth addition of This Week in Rails, where we’ll take a look of the past two weeks of innovation in the Rails community. If you’d rather listen to this content on your ipod with additional Ruby news, check out the Rails Envy Podcast #47 and #48.
The Rails Guides Hackfest is in full swing, improving the Rails documentation by leaps and bounds. Rails Routing from the Outside In by Mike Gunderloy is a great read if you’re ever confused by Rails Routing. If you want to help with the Guide hackfest, there are several guides up that you can help review.
If you ever need to build a website which allows users to upload videos and then needs to encode them, definitely check out Panda, an open source video encoding application which uses EC2, S3, and SimpleDB. The application itself is written in Merb, but it’s designed to run separately on ec2 and can easily integrate with your rails app on the front end.
If you’d like to ensure your Rails application is well written, Matt More wrote up a Rails Code Quality Checklist which serves as a great guide to Rails best practices. Also, if you need help discovering where your code might need a little re-factoring check out Roodi a new gem by Marty Andres that gives you instant feedback about your Ruby code by examining a few metrics including cyclomatic complexity, method length, bad method names, and blank blocks or loops. Lastly, if you’ve been following the “skinny controller, fat model” best practice, you may have found yourself with really fat models (not so good). Paul Barry suggests one way to deal with this using concerned_with.
If you’re about to start a new Rails application then you might consider using Bort, a Rails starter application from Jim Neath. Bort contains RESTful Auth, Will Paginate, Exception Notifier, Asset Packager, a Capistrano Recipe, and everything is tested by RSpec. If you’d rather start your system with email login instead of username, Matt Hall put together a fork of bort for this.
Implementing a page with multiple file uploads in Rails is no easy task. Luckily, Brian Getting wrote up a tutorial which makes it look easy.
Clemens Kofler wrote up a Guide to Memoization which walks through all the details of this convention and looks at the new “memoize” helper in Edge Rails ActiveSupport. If you don’t know what this word means, please do take the time to read his tutorial.
If you’ve ever developed a plugin, you may have just decided to manually run your tests every time you change your code. Last week Ken Collins recently put out a new library called Autotest Railsplugin which makes it dirt simple to run autotest on plugins you’re developing.
Lastly, if you’re looking for other Ruby/Rails podcasts, check out the Rails Podcast which recently featured Jim Weirich at erubycon, Rubyology which recently interviewed Avi Bryant, the Learning Rails podcast which recently covered how to deploy your rails app, Railscasts which recently covered starling and workling, and the Rails Brazil Podcast if you speak Portuguese.
That’s all for now. If you create or discover any notable tools or blog posts this week, feel free to send me an email (Gregg@RailsEnvy).
Image Credit: Still on the right track by janusz l