]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/trace.rb
Merge remote-tracking branch 'upstream/pull/5741'
[rails.git] / app / models / trace.rb
index d1f917571a21287f5de4e0a7a290e8e8337babb3..3001d052c0e8783f7d159cbd5a49677598dba485 100644 (file)
@@ -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?