<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,14 @@ module Prawnto
     class Base &lt; ActionView::TemplateHandler
 
       attr_reader :prawnto_options
+      
+      def initialize(view)
+        @view = view
+      end
+
+      def self.call(template)
+        &quot;Prawnto::TemplateHandler::Base.new(self).render(template, local_assigns)&quot;
+      end
 
       # TODO: kept around from railspdf-- maybe not needed anymore? should check.
       def ie_request?
@@ -36,7 +44,7 @@ module Prawnto
         set_disposition
       end
 
-      def build_source_to_establish_locals(template)
+      def build_source_to_establish_locals(template, local_assigns = {})
         prawnto_locals = {}
         if dsl = @prawnto_options[:dsl]
           if dsl.kind_of?(Array)
@@ -45,7 +53,7 @@ module Prawnto
             prawnto_locals.merge!(dsl)
           end
         end
-        prawnto_locals.merge!(template.locals)
+        prawnto_locals.merge!(local_assigns)
         prawnto_locals.map {|k,v| &quot;#{k} = #{v};&quot;}.join(&quot;&quot;)
       end
 
@@ -53,11 +61,11 @@ module Prawnto
         @prawnto_options = @view.controller.send :compute_prawnto_options
       end
 
-      def render(template)
+      def render(template, local_assigns = {})
         pull_prawnto_options
         build_headers
 
-        source = build_source_to_establish_locals(template)
+        source = build_source_to_establish_locals(template, local_assigns = {})
         if @prawnto_options[:dsl]
           source += &quot;pdf.instance_eval do\n#{template.source}\nend&quot;
         else</diff>
      <filename>lib/prawnto/template_handler/base.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9425cc0fa357bf73701d5f4bc8a1af4c52e0ac8b</id>
    </parent>
  </parents>
  <author>
    <name>Filip Tepper</name>
    <email>filip@tepper.pl</email>
  </author>
  <url>http://github.com/filiptepper/prawnto/commit/a62a3dc408fa02be3fe633cb3dc7bcd5c1952672</url>
  <id>a62a3dc408fa02be3fe633cb3dc7bcd5c1952672</id>
  <committed-date>2008-12-17T16:32:50-08:00</committed-date>
  <authored-date>2008-12-17T16:32:50-08:00</authored-date>
  <message>Rails 2.2 compatible.</message>
  <tree>78ca23be99d25a2e9b82558f1e0d8a349981b635</tree>
  <committer>
    <name>Filip Tepper</name>
    <email>filip@tepper.pl</email>
  </committer>
</commit>
