Initial commit

This commit is contained in:
Yaser
2026-08-13 19:56:46 +03:30
commit de1d57a67b
474 changed files with 43185 additions and 0 deletions

21
app/models/province.rb Normal file
View File

@@ -0,0 +1,21 @@
class Province < ApplicationRecord
has_many :cities
validates :name, presence: true,
length: 1..255,
format: {
with: /\A[[:word:]\s\-']+\z/,
message: 'only allows letters, digits "-", "\'", and space'
}
end
# == Schema Information
# Schema version: 20210420111532
#
# Table name: provinces
#
# id :bigint not null, primary key
# name :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#