Always define controller action methods in Rails 3

This morning was spent puzzling over a strange hard-to-reproduce Cucumber test failure in a project I have been upgrading from Rails 2.3.x to 3.0.3. It was only occurring after certain steps had been taken in previous Scenarios, and not when the failing Scenario was run on its own.

The solution was to explicitly define the controller action’s method in the controller. So the question to the world is: what changed, ActionController or something in the Cucumber chain?

ActiveRecord errors full_messages i18n incompatibility

If you’re running a Rails 2 app on a system with the latest i18n gem, ActiveRecord’s object.errors.full_messages spits out the string “{{attribute}} {{message}}”. You might notice that this is the old interpolation syntax for internationalisation in Rails 2. The latest i18n gem requires the %{} syntax. Sticking this into config/locales/en.yml fixed the problem for me, and future-proofs an app for when you accidentally upgrade the i18n gem on your production server: