On Tue, May 7, 2013 at 2:06 PM, Linus Pettersson
On Tue, May 7, 2013 at 2:06 PM, Linus Pettersson
<
linus.pe...@gmail.com> wrote:
> Absolutely, that's a valid argument. However, if you need to do some
> customizations and start monkey patching a gem you may open it up for
> vulnerabilities as well, right? Plus, it would make your code messy when you
> have some code in your project and some in the gem.
I wouldn't approach it this way. Since Devise provides the core
functions I need, I would wrap it up in a Class/Module that abstracts
the Devise parts while implementing my custom/application-specific
parts. Open classing (monkey patching) leaves one in a place where
upgrading Gems becomes exceedingly difficult, and causes confusion to
future maintainers, developers and testers when confronted with such
things.