Skip to content

Commit

Permalink
Rename register_from_railties to register_vmdb_plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
hayesr committed May 10, 2017
1 parent 307b4c0 commit 81b44aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Application < Rails::Application
# Because this is easy to mess up, keep your initializers in order.
# register plugins even before loading settings, as plugins can bring their own settings
initializer :register_vmdb_plugins, :before => :load_vmdb_settings do
Vmdb::Plugins.instance.register_from_railties
Vmdb::Plugins.instance.register_vmdb_plugins
end

initializer :load_vmdb_settings, :before => :load_config_initializers do
Expand Down
4 changes: 2 additions & 2 deletions lib/vmdb/plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ def initialize
end

def vmdb_plugins
@vmdb_plugins.empty? ? register_from_railties : @vmdb_plugins
@vmdb_plugins.empty? ? register_vmdb_plugins : @vmdb_plugins
end

def register_from_railties
def register_vmdb_plugins
Rails.application.railties.each do |railtie|
next unless railtie.class.name.start_with?("ManageIQ::Providers::") || railtie.try(:vmdb_plugin?)
register_vmdb_plugin(railtie)
Expand Down

0 comments on commit 81b44aa

Please sign in to comment.