From b591353773ed46155e478bdb675fc1eea72ecd01 Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 16 Feb 2020 03:36:10 -0600 Subject: [PATCH] /dmails: don't default to 'received' folder. Don't make /dmails default to the received folder when no other folder is specified. This is surprising in the API because it means /dmails.json only shows received dmails by default, not all dmails. This isn't necessary either since everything that links to dmails already specifies the received folder. --- app/controllers/dmails_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/dmails_controller.rb b/app/controllers/dmails_controller.rb index 12abbea64..649fc8a16 100644 --- a/app/controllers/dmails_controller.rb +++ b/app/controllers/dmails_controller.rb @@ -15,7 +15,7 @@ class DmailsController < ApplicationController end def index - @dmails = Dmail.visible.paginated_search(params, defaults: { folder: "received" }, count_pages: true) + @dmails = Dmail.visible.paginated_search(params, count_pages: true) @dmails = @dmails.includes(:owner, :to, :from) if request.format.html? respond_with(@dmails)