X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2dfe6f3f2e911101f4e4e3b90a00e2ae97725d04..8a88351a83fd75e89bd45d919195218c4d4642a1:/app/models/trace.rb?ds=sidebyside diff --git a/app/models/trace.rb b/app/models/trace.rb index 818cc363b..d1f917571 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -38,6 +38,7 @@ class Trace < ApplicationRecord scope :visible_to, ->(u) { visible.where(:visibility => %w[public identifiable]).or(visible.where(:user => u)) } scope :visible_to_all, -> { where(:visibility => %w[public identifiable]) } scope :tagged, ->(t) { joins(:tags).where(:gpx_file_tags => { :tag => t }) } + scope :imported, -> { where(:inserted => true) } has_one_attached :file, :service => Settings.trace_file_storage has_one_attached :image, :service => Settings.trace_image_storage