Commit e4b374d17864b153232e2d89dacc84204618958b
1 parent
00e9001e
Exists in
master
and in
29 other branches
Fixing plugin macros method
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/noosfero/plugin.rb
@@ -147,7 +147,7 @@ class Noosfero::Plugin | @@ -147,7 +147,7 @@ class Noosfero::Plugin | ||
147 | def macros | 147 | def macros |
148 | self.class.constants.map do |constant_name| | 148 | self.class.constants.map do |constant_name| |
149 | self.class.const_get(constant_name) | 149 | self.class.const_get(constant_name) |
150 | - end.select {|klass| klass < Noosfero::Plugin::Macro} | 150 | + end.select {|const| const.is_a?(Class) && const < Noosfero::Plugin::Macro} |
151 | end | 151 | end |
152 | 152 | ||
153 | # Here the developer may specify the events to which the plugins can | 153 | # Here the developer may specify the events to which the plugins can |