Skip to content

Commit

Permalink
allow seeding of dialogs from plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
durandom committed Apr 7, 2017
1 parent 9466b4d commit 8b28480
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ def self.seed
Dir.glob(ALL_YAML_FILES).each do |file|
dialog_import_service.import_all_service_dialogs_from_yaml_file(file)
end

Vmdb::Plugins.instance.registered_provider_plugins.each do |plugin|
Dir.glob(plugin.root.join('content', 'service_dialogs', '*.{yaml,yml}')).each do |file|
dialog_import_service.import_all_service_dialogs_from_yaml_file(file)
end
end
end

def each_dialog_field(&block)
Expand Down

0 comments on commit 8b28480

Please sign in to comment.