Module: Saucerly::PdfHelper
- Defined in:
- lib/saucerly/pdf_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 |
# File 'lib/saucerly/pdf_helper.rb', line 3 def self.included(base) base.class_eval do alias_method_chain :render, :saucerly end end |
Instance Method Details
#render_with_saucerly(options = nil, *args, &block) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/saucerly/pdf_helper.rb', line 9 def render_with_saucerly( = nil, *args, &block) if .is_a?(Hash) && .has_key?(:pdf) [:name] ||= .delete(:pdf) make_and_send_pdf(.delete(:name), ) else render_without_saucerly(, *args, &block) end end |