Commit 1098be610d999b0a54c80a299a69453dd8f1e7b5
1 parent
9593b2d9
Exists in
master
and in
29 other branches
Replacing scary eval's with String#constantize
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/controllers/admin/plugins_controller.rb
lib/noosfero/plugin/manager.rb
... | ... | @@ -12,7 +12,7 @@ class Noosfero::Plugin::Manager |
12 | 12 | |
13 | 13 | def enabled_plugins |
14 | 14 | @enabled_plugins ||= (Noosfero::Plugin.all & context.environment.enabled_plugins).map do |plugin| |
15 | - p = eval(plugin).new | |
15 | + p = plugin.constantize.new | |
16 | 16 | p.context = context |
17 | 17 | p |
18 | 18 | end | ... | ... |