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.
Comments
Leave a Reply