thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
499 stars 30 forks source link

Don't validate URL uniqueness if unchanged #182

Closed pbrisbin closed 9 years ago

pbrisbin commented 9 years ago

On updates that don't change URL, the uniqueness validation was causing an error because the record itself was showing up as an existing record.

This patch checks first if the URL has been changed (or is new) before validating uniqueness.

Resolves #181

JoelQ commented 9 years ago

:+1:

pbrisbin commented 9 years ago

Thanks @JoelQ -- Travis has been failing lately, unable to get the postgresql connection. I've restarted the build and will rebase/merge when green.