Logging validation errors.... possible?

Hi

I'd like to log the email when a "validates_uniqueness_of :email" test fails on user sign-up.

The reason for this is that I'd like to keep watch on who is trying to use multiple accounts (for the purposes of minimizing disruptive behaviour on my website)

So, for a new user, if they tried to first signup using an existing email address, I'd like to have that logged in a text file somewhere.

Is there a straight-forward way to do this?

thanks

Jason Bowerman wrote:

Hi

I'd like to log the email when a "validates_uniqueness_of :email" test fails on user sign-up.

The reason for this is that I'd like to keep watch on who is trying to use multiple accounts (for the purposes of minimizing disruptive behaviour on my website)

So, for a new user, if they tried to first signup using an existing email address, I'd like to have that logged in a text file somewhere.

Is there a straight-forward way to do this?

thanks

logger.warn "message"

would probably do the trick.

_Kevin