Commit 12761a56c17630ae7fd35972e54990d494d2e087
Exists in
master
and in
29 other branches
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,6 +65,11 @@ class Noosfero::Plugin | ||
65 | end | 65 | end |
66 | end | 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 | # Here the developer may specify the events to which the plugins can | 73 | # Here the developer may specify the events to which the plugins can |
69 | # register and must return true or false. The default value must be false. | 74 | # register and must return true or false. The default value must be false. |
70 | 75 |