Our great sponsors
-
DatabaseConsistency
The tool to avoid various issues due to inconsistencies and inefficiencies between a database schema and application models.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
This story is about a problem of uniqueness validation in ActiveRecord (Ruby on Rails default ORM). Even though the issue is quite common, most available guidelines provide incomplete solutions. That is why I want to share how to deal with the problem and ensure it does not come back.
DatabaseConsistency is a tool to avoid various issues due to inconsistencies and inefficiencies between a database schema and application models.
DatabaseValidations provides database-driven validations for ActiveRecord.
Related posts
- BasedUUID: URL-friendly, Base32-encoded UUIDs for Rails models
- Many of us can face issues working with ActiveRecord due to its inconsistency with the database schema. That's why I have built database_consistency, which can help you avoid the most common issues and improve your application's performance.
- Friendly IDs for Ruby on Rails
- Ecto's uniqueness constraint vs. Rails' uniqueness validation
- Enhanced ActiveRecord preloading