@pablobm commented on this pull request.

This also needs a migration: the DB schema still has "public" as default value 
for the visibility column.

>    validates :user, :associated => true
   validates :name, :presence => true, :length => 1..255, :characters => true
   validates :description, :presence => { :on => :create }, :length => 1..255, 
:characters => true
   validates :timestamp, :presence => true
-  validates :visibility, :inclusion => %w[private public trackable 
identifiable]
+  validates :visibility, :inclusion => VISIBILITIES + LEGACY_VISIBILITIES

Thoughts on a custom validator here? To check that there's no accidental jump 
from valid to legacy value.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7146#pullrequestreview-4497832112
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/7146/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to