/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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user