Have you ever needed multiple validations on one field (I bet you did!) but didn't like multiple error messages showing up at the same time? Read my blog post to see how you can prevent it.
2011 has been a good year for me so far – financially as well as in terms of cool work in general. I feel like it’s time to share some of that luck with others and spend a couple of hours per week working pro bono, helping people. Read the blog post for details and spread the word. :-)
Lots of people love using named scopes in Rails 2. However, in Rails 3 they're not only more or less obsolete but can also hinder productiveness in teams by being update blockers. Read about the reasons and alternatives in the railway blog.
If you want/need to have both, Rails 3 and Rails 2.3, installed in parallel on your system you might want to read the latest blog post over on the railway.at blog to find out how you can avoid running into dependency hell by using Ruby Version Manager (rvm).
Have you ever wondered how to test your multilingual app using Cucumber without breaking your steps every time you change a text? Or how to test the app across multiple locales? And all that - if possible - without cluttering up your stories/steps too much? Read here about some possible approaches.
Trevor Turk's Simple Localiziation in Rails 2.2 showed some basics of localizing parts of your Rails applications. The article Localizing Rails could be seen as a more in-depth follow-up on Trevor's article. It includes a demo application that shows of most of the localization features that are built right into Rails core at the moment.
I just released my localized_dates plugin that is based on Rails' new i18n features and helps localizing date and time formats. Check out the announcement and the GitHub project including a massive readme.
Ever wondered when and when not to raise exceptions? This article should give you an idea when raising exceptions is a good idea an when you should avoid it.
It does that by walking through a practical example (a method in the Rails i18n project).
The second Part of the Guide to Unobtrusive JavaScript hast just been published on the railway blog. If you're interested in keeping your HTML clean of JavaScript code, this article might give you a few cool tips on how to do it using the great lowpro library.
Unobtrusive JavaScript has been a big topic over the last few months and even years. This article is the first in a series of articles to come and shows you how to remove JavaScript from your HTML codes using Dan Webb's phenomenal Prototype-based library to define behaviors of page elements.
Hardly anybody denies that testing your model is absolutely necessary to build a robust application. The question is: Do we really need Controller and View tests in our Rails applications?(The article talks about rspec and Rails but most of it can also be applied to other testing frameworks and web frameworks.)