Make sure tags only get applied once (wincent.dev, 3342585)

Use database-level constraints to ensure that tags only get applied once to any given model instance. Application-level constraints are not appropriate because they're vulnerable to race conditions (due to the window between checking if a tag is already applied and trying to apply it).

Signed-off-by: Greg Hurrell <greg@hurrell.net>

← Add Taggable module (wincent.dev, 003f9f3)
Whitespace fix (wincent.dev, bfa88e8) →

All snippets