diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-02 20:07:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-02 20:07:10 +0000 |
commit | 614973b2b6cd142d2ae3dd40fdb7a8925b69f4cc (patch) | |
tree | 869a92f51a906b66554da7435c6dfb4d451b47bf | |
parent | d4ab8fbd17dc54bd75e4b8065cbab2ef9b3bcf22 (diff) | |
download | redmine-614973b2b6cd142d2ae3dd40fdb7a8925b69f4cc.tar.gz redmine-614973b2b6cd142d2ae3dd40fdb7a8925b69f4cc.zip |
rfpdf compatibility with Rails 2.1 fix.
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1614 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | rails-2.1/vendor/plugins/rfpdf/lib/rfpdf/view.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rails-2.1/vendor/plugins/rfpdf/lib/rfpdf/view.rb b/rails-2.1/vendor/plugins/rfpdf/lib/rfpdf/view.rb index 185811202..b93fbe76e 100644 --- a/rails-2.1/vendor/plugins/rfpdf/lib/rfpdf/view.rb +++ b/rails-2.1/vendor/plugins/rfpdf/lib/rfpdf/view.rb @@ -45,6 +45,14 @@ module RFPDF :temp_dir => "#{File.expand_path(RAILS_ROOT)}/tmp" }.merge(@action_view.controller.instance_eval{ @options_for_rfpdf } || {}).with_indifferent_access end + + def self.compilable? + false + end + + def compilable? + self.class.compilable? + end def render(template, local_assigns = {}) @pdf_name = "Default.pdf" if @pdf_name.nil? @@ -66,7 +74,7 @@ module RFPDF local_assigns.each do |key,val| class << self; self; end.send(:define_method,key){ val } end - ERB.new(template).result(binding) + ERB.new(template.source).result(binding) end end |