Module: Prawnto::ActionControllerMixin::ClassMethods

Defined in:
lib/prawnto/action_controller_mixin.rb

Instance Method Summary collapse

Instance Method Details

#prawnto(options) ⇒ Object

This is the class setter. It lets you set default options for all prawn actions within a controller.



16
17
18
19
20
# File 'lib/prawnto/action_controller_mixin.rb', line 16

def prawnto(options)
  prawn_options, prawnto_options = breakdown_prawnto_options options
  self.prawn_hash = prawn_options
  self.prawnto_hash = DEFAULT_PRAWNTO_OPTIONS.dup.merge(prawnto_options)
end