Fork me on GitHub

Keep Learning Conhecimento nunca é o bastante

Postado em
7 April 2008 @ 14:37

In English, Plugin, Rails

Contributing: reserved_attributes Rails plugin

Here’s my first contribution to the Rails community: the reserved_attributes plugin.

The plugin is very simple, just adding a rake task to your project. The task scans all your models checking its attributes (columns) and warning you if any of them have a name that are a Ruby/Rails reserved word.

Some time ago I spent about 8 hours of work because my unit tests was breaking with a very strange error (and a gigantic trace). It turns out that I was using an attribute called “notify” and there’s already an internal method with that name, so I was overriding it and breaking everything. I’ve seen many people with the same problem, so here’s a little help. Take a look at the repository main page to see the README file with instructions.

The plugin is hosted at github and you’re free to fork and improve it.

Nenhum comentário até agora

Nenhum comentário ainda. Você pode ser o primeiro!

Deixe um comentário