Module: Princely::PdfHelper
- Defined in:
- lib/princely/pdf_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/princely/pdf_helper.rb', line 7 def self.included(base) base.send :alias_method_chain, :render, :princely end |
Instance Method Details
#render_with_princely(options = nil, *args, &block) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/princely/pdf_helper.rb', line 11 def render_with_princely( = nil, *args, &block) if .is_a?(Hash) && .has_key?(:pdf) [:name] ||= .delete(:pdf) make_and_send_pdf(.delete(:name), ) else render_without_princely(, *args, &block) end end |