X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e3c919275818d46a515c183cf373d7a53bc6942a..ab4f96261fe043ba704616e8b6f7cf77e79817bf:/app/models/trace.rb 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?