My Rails app is using an engine that defines an acronym inflection:
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym "UI"
end
This means (for example) that Rails will load UIHelper
from helpers/ui_helper.rb
rather than UiHelper
.
Now I want to user a gem ("motor-admin"
) but I'm getting this error:
uninitialized constant Motor::UIController
This is because the gem's class name is Motor::UiController
but the inflections are looking for Motor::UIController
(note the Ui
vs UI
).
I've tried following the Customizing Inflections in the Rails Guides, but can't seem to make the error go away.
How can I configure Rails to correctly load Motor::UiController
with the "UI"
acronym inflection?