To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / config / initializers / 00-core_plugins.rb @ 1566:ac2e4a54a6a6
History | View | Annotate | Download (509 Bytes)
| 1 |
# Loads the core plugins located in lib/plugins
|
|---|---|
| 2 |
Dir.glob(File.join(Rails.root, "lib/plugins/*")).sort.each do |directory| |
| 3 |
if File.directory?(directory) |
| 4 |
lib = File.join(directory, "lib") |
| 5 |
if File.directory?(lib) |
| 6 |
$:.unshift lib
|
| 7 |
ActiveSupport::Dependencies.autoload_paths += [lib] |
| 8 |
end
|
| 9 |
initializer = File.join(directory, "init.rb") |
| 10 |
if File.file?(initializer) |
| 11 |
config = RedmineApp::Application.config |
| 12 |
eval(File.read(initializer), binding, initializer)
|
| 13 |
end
|
| 14 |
end
|
| 15 |
end
|