X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/15e86708f1948d5b07a08bc2a30bf315bab9c07e..30415443e95494fd9c217c7d83c9aa2d13d203fd:/app/models/trace.rb?ds=sidebyside diff --git a/app/models/trace.rb b/app/models/trace.rb index 20723b98d..3001d052c 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -2,11 +2,11 @@ # # Table name: gpx_files # -# id :bigint(8) not null, primary key -# user_id :bigint(8) not null +# id :bigint not null, primary key +# user_id :bigint not null # visible :boolean default(TRUE), not null # name :string default(""), not null -# size :bigint(8) +# size :bigint # latitude :float # longitude :float # timestamp :datetime not null @@ -86,11 +86,11 @@ class Trace < ApplicationRecord end def public? - visibility == "public" || visibility == "identifiable" + %w[public identifiable].include?(visibility) end def trackable? - visibility == "trackable" || visibility == "identifiable" + %w[trackable identifiable].include?(visibility) end def identifiable?