At the moment, when trying to setup the "autocomplete" functionality with a model that is under a package, the routing breaks.
Take the following model as an example:
"OleCore::Distributor"
This model, on this line, is converted to the following path:
_ole_coredistributor
Which is then received by the autocomplete processor on this line, which converts the path to:
OleCoreDistributor
Which, obviously, causes a ModelNotFound error to be thrown from rails.
The problem here is that when using a package name, the package cannot be converted to underscores, it has to be converted to slashes. By replacing the line on the first link (see my commit), the reflection generated is the following:
_olecore/distributor
Which works as long as you use the following configuration option in application.rb
At the moment, when trying to setup the "autocomplete" functionality with a model that is under a package, the routing breaks.
Take the following model as an example: "OleCore::Distributor"
This model, on this line, is converted to the following path:
_ole_coredistributor
Which is then received by the autocomplete processor on this line, which converts the path to:
OleCoreDistributor
Which, obviously, causes a ModelNotFound error to be thrown from rails.
The problem here is that when using a package name, the package cannot be converted to underscores, it has to be converted to slashes. By replacing the line on the first link (see my commit), the reflection generated is the following:
_olecore/distributor
Which works as long as you use the following configuration option in application.rb
By using the right function, underscore, we allow autocompletion to work with any number of packages for any models!