RoR and stored procedures

Stored procedures put logic into the database. A place where it's hard
to test, hard to version control, hard to access, and typically
written in a low-level language that's a pain to deal with. Every now
and then, you might find yourself in a situation where they're
actually worth it for performance reasons. Just like some times it
makes sense to write a piece of your application in C.

Treat stored procedures like C: Avoid it like the plague until it's
your only hope for survival.