Commit f42c96a7d74eed939162ac46a579c3e50aad454c
Exists in
master
and in
29 other branches
Merge branch 'ai3294' into 'master'
Fix path and init loading order to be as in noosfero-rails2 http://noosfero.org/Development/ActionItem3294 See merge request !311
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
lib/noosfero/plugin.rb
@@ -62,10 +62,12 @@ class Noosfero::Plugin | @@ -62,10 +62,12 @@ class Noosfero::Plugin | ||
62 | path << File.join(dir, 'lib') | 62 | path << File.join(dir, 'lib') |
63 | # load vendor/plugins | 63 | # load vendor/plugins |
64 | Dir.glob(File.join(dir, '/vendor/plugins/*')).each do |vendor_plugin| | 64 | Dir.glob(File.join(dir, '/vendor/plugins/*')).each do |vendor_plugin| |
65 | - path << "#{vendor_plugin}/lib" | ||
66 | - init = "#{vendor_plugin}/init.rb" | ||
67 | - require init.gsub(/.rb$/, '') if File.file? init | ||
68 | - end | 65 | + path << "#{vendor_plugin}/lib" |
66 | + end | ||
67 | + end | ||
68 | + Dir.glob(File.join(dir, '/vendor/plugins/*')).each do |vendor_plugin| | ||
69 | + init = "#{vendor_plugin}/init.rb" | ||
70 | + require init.gsub(/.rb$/, '') if File.file? init | ||
69 | end | 71 | end |
70 | 72 | ||
71 | # add view path | 73 | # add view path |