Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

validate uniqueness of (item type, size, category) triple in inventory #79

@juliagrigni

Description

@juliagrigni

I don't know why this doesn't work, but it allows duplicates and then errors when I try to edit the item to make it not a duplicate anymore: https://stackoverflow.com/questions/7428872/rails-validate-unique-combination-of-3-columns
in item.rb:
validates_uniqueness_of :itemType, scope: [:category, :size], message: "That category, name, size combination is already in use"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions