Slide 20
Slide 20 text
มߋલ
w
module PdfHelper
def self.prepended(base)
# Protect from trying to augment modules that appear
# as the result of adding other gems.
return if base != ActionController::Base
base.class_eval do
after_action :clean_temp_files
alias_method :render_without_wicked_pdf, :render
alias_method :render_to_string_without_wicked_pdf, :render_to_string
def render(options = nil, *args, &block)
render_with_wicked_pdf(options, *args, &block)
end
def render_to_string(options = nil, *args, &block)
render_to_string_with_wicked_pdf(options, *args, &block)
end
end
end
end