summaryrefslogtreecommitdiffstats
path: root/vendor/plugins/rfpdf/init.rb
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/rfpdf/init.rb')
-rw-r--r--vendor/plugins/rfpdf/init.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/plugins/rfpdf/init.rb b/vendor/plugins/rfpdf/init.rb
index 7e51d9eba..339bacfdb 100644
--- a/vendor/plugins/rfpdf/init.rb
+++ b/vendor/plugins/rfpdf/init.rb
@@ -1,3 +1,9 @@
require 'rfpdf'
-ActionView::Base::register_template_handler 'rfpdf', RFPDF::View \ No newline at end of file
+begin
+ ActionView::Template::register_template_handler 'rfpdf', RFPDF::View
+rescue NameError
+ # Rails < 2.1
+ RFPDF::View.backward_compatibility_mode = true
+ ActionView::Base::register_template_handler 'rfpdf', RFPDF::View
+end