Skip to content

Commit

Permalink
Refactor city model with more validations
Browse files Browse the repository at this point in the history
  • Loading branch information
Estete9 committed Feb 15, 2024
1 parent e451ede commit a6cc589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/city.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class City < ApplicationRecord
has_many :reservations, dependent: :destroy

validates :name, presence: true, type: String, length: { minimum: 1 }
validates :name, presence: true, length: { minimum: 1 }
end

0 comments on commit a6cc589

Please sign in to comment.