X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8a5c9a8052489c04a64856c2f0579647a1637326..ab4f96261fe043ba704616e8b6f7cf77e79817bf:/app/models/trace.rb diff --git a/app/models/trace.rb b/app/models/trace.rb index d1f917571..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 @@ -81,16 +81,16 @@ class Trace < ApplicationRecord :content_type => content_type(attachable.path), :identify => false) else - super(attachable) + super end 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?