Commit 12761a56c17630ae7fd35972e54990d494d2e087

Authored by Joenio Costa
2 parents 534b6af9 3f24e889

Merge commit 'refs/merge-requests/45' of git://gitorious.org/noosfero/noosfero into stable

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
lib/noosfero/plugin.rb
... ... @@ -65,6 +65,11 @@ class Noosfero::Plugin
65 65 end
66 66 end
67 67  
  68 + def expanded_template(file_path, locals = {})
  69 + views_path = "#{RAILS_ROOT}/plugins/#{self.class.public_name}/views"
  70 + ERB.new(File.read("#{views_path}/#{file_path}")).result(binding)
  71 + end
  72 +
68 73 # Here the developer may specify the events to which the plugins can
69 74 # register and must return true or false. The default value must be false.
70 75  
... ...