19 lines
450 B
Ruby
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
|