Class: Hippo::API::Handlers::Print

Inherits:
Object
  • Object
show all
Defined in:
lib/hippo/api/handlers/print.rb

Class Method Summary collapse

Class Method Details

.getterObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/hippo/api/handlers/print.rb', line 4

def self.getter
    lambda do
        template_klass = Hippo::Templates::Latex.for_identifier(params['template_id'])
        status 404 and return if not template_klass

        form = template_klass.new(params['model_id'])
        content_type 'application/pdf'
        form.as_pdf
    end
end