app/controllers/ecm/cms/page_controller.rb in ecm_cms2-2.0.2 vs app/controllers/ecm/cms/page_controller.rb in ecm_cms2-2.0.3
- old
+ new
@@ -18,9 +18,10 @@
end
def respond
respond_to do |format|
format.html { render template: params[:page] }
+ format.txt { render template: params[:page], layout: false, formats: [:text] }
format.pdf do
output = render_to_string template: params[:page], formats: [:html, :pdf], layout: false
self.response_body = WickedPdf.new.pdf_from_string(output)
end if Gem::Specification.find_all_by_name('wicked_pdf').any?
end