diff options
Diffstat (limited to 'app/controllers/concerns/snippets_sort.rb')
-rw-r--r-- | app/controllers/concerns/snippets_sort.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/concerns/snippets_sort.rb b/app/controllers/concerns/snippets_sort.rb new file mode 100644 index 00000000000..f122c843af7 --- /dev/null +++ b/app/controllers/concerns/snippets_sort.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module SnippetsSort + extend ActiveSupport::Concern + + def sort_param + params[:sort].presence || 'updated_desc' + end +end |