Skip to content

Commit

Permalink
Merge pull request #22620 from jrafanie/pre_zeitwerk_inflectors_update
Browse files Browse the repository at this point in the history
Pre-zeitwerk - Add inflections and acronyms
  • Loading branch information
Fryguy committed Jul 14, 2023
2 parents 4d55774 + 6c1b362 commit 5805be9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/vmdb/inflections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,24 @@ def self.load_core_inflections
inflect.plural(/quota$/, "quotas")
inflect.irregular("container_quota", "container_quotas")

inflect.acronym('DBus')
inflect.acronym('DDF')
inflect.acronym('GHT')
inflect.acronym('IPMI')
inflect.acronym('ManageIQ')
inflect.acronym('MKS')
inflect.acronym('OAuth')
inflect.acronym('REXML')
inflect.acronym('SAP')
inflect.acronym('SSL')
inflect.acronym('UI')
end

# ActiveSupport::Inflector.inflections doesn't allow us to blanket tell how to autoload a constant from a file
# This works around the UI acronym above.
Rails.autoloaders.each do |autoloader|
autoloader.inflector.inflect('miq_ui_worker' => "MiqUiWorker")
autoloader.inflector.inflect('vpc' => "VPC")
end
end

Expand Down

0 comments on commit 5805be9

Please sign in to comment.