From 3f24e889eb823cca9d7fe3c900bc09e4ff7ef56a Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 13 Oct 2011 20:14:11 -0300 Subject: [PATCH] Putting expanded_template back --- lib/noosfero/plugin.rb | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/noosfero/plugin.rb b/lib/noosfero/plugin.rb index 16d6bb3..a51e3e8 100644 --- a/lib/noosfero/plugin.rb +++ b/lib/noosfero/plugin.rb @@ -65,6 +65,11 @@ class Noosfero::Plugin end end + def expanded_template(file_path, locals = {}) + views_path = "#{RAILS_ROOT}/plugins/#{self.class.public_name}/views" + ERB.new(File.read("#{views_path}/#{file_path}")).result(binding) + end + # Here the developer may specify the events to which the plugins can # register and must return true or false. The default value must be false. -- libgit2 0.21.2