Category Archives: Ruby on Rails

swedish_pluralize plugin: Swedish pluralization rules for Rails

For those of you looking for Swedish pluralization for Rails, I just refactored this module of ours into a plugin. You can find it on GitHub: http://github.com/newsdesk/swedish_pluralize/tree/master It’s extracted from the old swe_rails plugin by Ola Bini, which did a … Continue reading

Posted by Leave a comment Posted in Ruby on Rails Tagged , , , ,

Translate: New Rails I18n Plugin with a Nice Web UI

Here at Mynewsdesk we are in the midst of internationalizing a fairly big Ruby on Rails application. Sven Fuchs’s I18n Textmate bundle has been a great help in extracting thousands of texts away from our source code and into YAML … Continue reading

Posted by 41 Comments Posted in Ruby on Rails Tagged ,

The “returning” method explained

This one you will find all over the Rails code. The “returning” trick is a really neat way to refactor ugly patterns, such as this one: object = [] object << “foo” if bar? object Into this: returning [] do … Continue reading

Posted by Leave a comment Posted in Ruby on Rails Tagged ,

Using Google Charts from rails

A week ago i got an interesting ticket – update the Newsdesk statistics charts for printing and sending via email. Although people here are quite satisfied whith the look and feel of our current solutions Fusion Charts, we feel that … Continue reading

Posted by 5 Comments Posted in Ruby on Rails Tagged , , , , , , ,