Skip to content

Commit

Permalink
Merge pull request #22110 from agrare/pluggable_notification_types
Browse files Browse the repository at this point in the history
Add pluggable notification_types
  • Loading branch information
Fryguy authored Sep 16, 2022
2 parents 3a82984 + 249e639 commit 60fb3f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/notification_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def self.seed
end

def self.seed_data
fixture_file = File.join(FIXTURE_DIR, 'notification_types.yml')
File.exist?(fixture_file) ? YAML.load_file(fixture_file) : []
fixture_files = Vmdb::Plugins.flat_map { |plugin| plugin.root.join("content/notification_types.yml") }
fixture_files << FIXTURE_DIR.join('notification_types.yml')

fixture_files.select(&:exist?).flat_map { |f| YAML.load_file(f) }
end
end

0 comments on commit 60fb3f5

Please sign in to comment.