Tim Lucas
At the recent Web Directions 06 conference Cameron Adams and Sitepoint’s own Kevin Yank gave a talk on Mashups and APIs, with a mention of JSON-P. JSON-P is a method of wrapping the JSON output... Read More
If you haven’t used it before, the reaper script is useful for restarting your Rails application’s FastCGI dispatchers. It’s seems the reaper script in Edge rails now relies on the... Read More
Using ActiveRecord's RecordNotFound exception to cleanly and consistently handle 404s throughout your applicationRead More
When calling third parties you want to set them a sensible timeout, and you also might want to make a few attempts before giving up. Here’s a relatively succinct way to accomplish this in Ruby... Read More
Rails provides a few caching techniques, one of which is a fragment cache. The fragment cache is a dead-easy way to cache bits of your view. After checking that your queries are doing sensible... Read More
The Rails team have released another security update, 1.1.5. Update your code/environment.rb to point to the new gem version, or go grab 1.1.5 and put it in your application’s vendor directory.... Read More
By default Rails logs all your POST parameters in both development and production. If you are accepting credit card numbers, passwords or other sensitive information then all this data will end up in... Read More
By request, I’ll give you a quick rundown on how to develop against the latest version of Rails. Why would you want to do this? You might be working on a brand new app that’ll be in... Read More
In an ecommerce application I’m currently building there’s a URL for destroying a line item in the user’s cart: http://127.0.0.1:3000/cart/line-item/16/destroy Like all good web... Read More
If you haven’t done so yet, go grab the latest Rails 1.1.4 update which fixes a security hole in route processing. You can read more about the release on the official announcement (as well as... Read More
Rick Olson’s released a Routing Navigator plugin to help understand how the Rails routing system works for your application (note: it only supports edge rails, not v1.1.2). To test it out:... Read More
Jeremy Kemper just added pessimistic locking to ActiveRecord: Person.transaction do person = Person.find(1, :lock => true) person.visits += 1 person.save! end Get Started withRuby on Rails Github,... Read More
Something that might have slipped your radar in your Ruby readings is Symbol#to_proc, something that’s been in Rails since 0.14.4. Using this nice little tidbit of Ruby tricky you can simplify... Read More
Use Ruby's method_missing madness to add some DRY to your ActiveRecord migrations. Rails 1.1 introduced
Object#with_options which allows you to remove duplication for method calls with... Read More




