Skip to content

Commit

Permalink
Refactored require directive for plugins.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Sep 27, 2011
1 parent 69cdb3c commit 67766d4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/fat_free_crm/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ def dependencies(*plugins)

plugins.each do |name|
plugin_path = File.join(Rails.root, 'vendor/plugins', name.to_s)
if File.directory?(plugin_path)
@initializer.send(:eval, File.read(File.join(plugin_path, 'init.rb')))
else
require name.to_s
end
require File.directory?(plugin_path) ? File.join(plugin_path, 'init') : name.to_s
end
end

Expand Down

0 comments on commit 67766d4

Please sign in to comment.