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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index 1810764a5..c49e4f4d1 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -340,6 +340,12 @@ class Query < ActiveRecord::Base
scope :sorted, lambda {order(:name, :id)}
+ # to be implemented in subclasses that have a way to determine a default
+ # query for the given options
+ def self.default(**_)
+ nil
+ end
+
# Scope of visible queries, can be used from subclasses only.
# Unlike other visible scopes, a class methods is used as it
# let handle inheritance more nicely than scope DSL.