summaryrefslogtreecommitdiffstats
path: root/app/models/query.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/query.rb')
-rw-r--r--app/models/query.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index 7d30e5d59..8d5f55061 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -339,6 +339,7 @@ class Query < ActiveRecord::Base
end)
scope :sorted, lambda {order(:name, :id)}
+ scope :only_public, ->{ where(visibility: VISIBILITY_PUBLIC) }
# to be implemented in subclasses that have a way to determine a default
# query for the given options