instance method locate_plugins_under

Ruby on Rails 2.3.18

Last seen in v2.3.18 Private — implementation detail, not part of the public API

Available in: v2.2.3 v2.3.18

Signature

locate_plugins_under(base_path)

This starts at the base path looking for valid plugins (see Rails::Plugin#valid?). Since plugins can be nested arbitrarily deep within an unspecified number of intermediary directories, this method runs recursively until it finds a plugin directory, e.g.

locate_plugins_under('vendor/plugins/acts/acts_as_chunky_bacon')
=> <Rails::Plugin name: 'acts_as_chunky_bacon' ... >

Parameters

base_path req
Source
# File railties/lib/rails/plugin/locator.rb, line 65
        def locate_plugins_under(base_path)
           Dir.glob(File.join(base_path, '*')).sort.inject([]) do |plugins, path|
            if plugin = create_plugin(path)
              plugins << plugin
            elsif File.directory?(path)
              plugins.concat locate_plugins_under(path)
            end
            plugins
          end
        end

Defined in railties/lib/rails/plugin/locator.rb line 65 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Plugin::FileSystemLocator

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close