Module: RailsPdfRenderer::ActionControllerHelper
- Defined in:
- lib/rails/pdf/renderer/action_controller_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
3 4 5 6 7 |
# File 'lib/rails/pdf/renderer/action_controller_helper.rb', line 3 def self.prepended(base) # Protect from trying to augment modules that appear # as the result of adding other gems. return if base != ActionController::Base end |
Instance Method Details
#render(*args) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/rails/pdf/renderer/action_controller_helper.rb', line 9 def render(*args) = args.first if .is_a?(Hash) && .key?(:pdf) make_and_send_pdf(.delete(:pdf), RailsPdfRenderer.configuration..merge()) else super end end |
#render_to_string(*args) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/rails/pdf/renderer/action_controller_helper.rb', line 18 def render_to_string(*args) = args.first if .is_a?(Hash) && .key?(:pdf) make_pdf(RailsPdfRenderer.configuration..merge()) else super end end |