Categories: None [Edit]
idxfence
idxfence cross-references every `validates :column, uniqueness: true`
/ `uniqueness: { scope: ... }` / `validates_uniqueness_of` declaration
in app/models/*.rb against db/schema.rb's create_table blocks, and
flags any whose column set (including scope columns) has no matching
`t.index [...], unique: true`. An ActiveRecord uniqueness validation
only performs a SELECT ... WHERE check at the application layer
before an INSERT -- under real concurrency, two requests can both
pass that check before either commits, landing a genuine duplicate
row despite the validation "working." Rails Guides themselves
document this exact race and recommend a matching DB-level unique
index as the only real fix; plenty of real apps ship with only the
AR-level check.
Total
Ranking: 183,025 of 197,375
Downloads: 2,033
Daily
Ranking: 59,372 of 197,350
Downloads: 5
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 29 | 1,028,902,730 | rspec |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | jaytank_dev |