Manuel Bustillo 24c39f331a
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m6s
Add copyright notice / copyright_notice (pull_request) Successful in 1m53s
Run unit tests / unit_tests (pull_request) Successful in 4m17s
Define a simple wedding model
2024-11-30 19:30:04 +01:00

19 lines
450 B
Ruby

# == Schema Information
#
# Table name: weddings
#
# id :uuid not null, primary key
# date :date not null
# slug :string not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_weddings_on_slug (slug) UNIQUE
#
class Wedding < ApplicationRecord
validates :date, presence: true
validates :slug, presence: true, uniqueness: true
end