Skip to content
Browse files

fixed bug where last line had to be newline -- no longer

also cleaned up some debug statements
  • Loading branch information...
1 parent d720cf8 commit d8b54b14c7a9633d2c3ce6c35fc428b7b2f22fa6 thorny_sun committed Dec 30, 2008
Showing with 2 additions and 6 deletions.
  1. +1 −3 lib/prawnto/template_handlers/base.rb
  2. +1 −3 lib/prawnto/template_handlers/dsl.rb
View
4 lib/prawnto/template_handlers/base.rb
@@ -4,11 +4,9 @@ class Base < ::ActionView::TemplateHandler
include ::ActionView::TemplateHandlers::Compilable
def compile(template)
- "puts 'base';" +
- "logger.warn 'BASE';" +
"_prawnto_compile_setup;" +
"pdf = Prawn::Document.new(@prawnto_options[:prawn]);" +
- template.source +
+ "#{template.source}\n" +
"pdf.render;"
end
end
View
4 lib/prawnto/template_handlers/dsl.rb
@@ -3,9 +3,7 @@ module TemplateHandlers
class Dsl < Base
def compile(template)
- "logger.warn local_variables;" +
- "z = _prawnto_compile_setup(true);" +
- "logger.warn local_assigns;" +
+ "_prawnto_compile_setup(true);" +
"pdf = Prawn::Document.new(@prawnto_options[:prawn]);" +
"pdf.instance_eval do; #{template.source}\nend;" +
"pdf.render;"

0 comments on commit d8b54b1

Please sign in to comment.
Something went wrong with that request. Please try again.