我已经让Pjax为我的站点加载了内部内容,但是对于PDF,它失败了,并且似乎试图在容器中读取内容,而不是强迫它尝试默认行为。导致了这样的事情
%PDF-1.4 %����74 0 obj <> endobj xref 74
然后点击“查找更多”按钮.http://ogilvyeast.mywellbeing.org/ckeditor_assets/attachments/14/8C_johari_window.pdf
如何使pjax失败/默认为标准行为?
谢谢
发布于 2012-06-06 15:09:47
据我所知,您可能正在使用pjax-rails宝石。在这种情况下,只需将PDF链接上的data-skip-pjax属性设置为执行完整的页面加载:
<a href="/ckeditor_assets/attachments/14/8C_johari_window.pdf" target="_blank" data-skip-pjax="true">Find out more...</a>或者使用link_to
link_to "Find out more...", whatever_path, :target => "_blank", :"data-skip-pjax" => truehttps://stackoverflow.com/questions/10831206
复制相似问题