Project

General

Profile

« Previous | Next » 

Revision 9496e262

Added by Marek Hulán over 9 years ago

Fixes #8851 - support seed files of plugin with dash in name

(cherry picked from commit 01652bbe92a9824a82fcfd6a4f98d61478e52b52)

View differences:

db/seeds.rb
Foreman::Plugin.registered_plugins.each do |name, plugin|
begin
engine = (name.to_s.camelize + '::Engine').constantize
engine = (name.to_s.tr('-', '_').camelize + '::Engine').constantize
foreman_seeds += Dir.glob(engine.root + 'db/seeds.d/*.rb')
rescue NameError => e
end

Also available in: Unified diff