Doesn't respond to custom request format

I’m using **wicked_pdf** to handle PDF response but rails use HTML response even I already set route form to “pdf”.

The pdf mime type already been registered.

At controller:

respond_to :pdf, only: :show

GET /documents/1

GET /documents/1.pdf

def show
retrieve_document_search_hits(@document)
respond_with(@document) do |format|
format.pdf { render pdf: @document.display_text }
format.html
end
end

rails v4.2.1

responders v2.1.0