Closed philsturgeon closed 6 years ago
Phiiiil! :beers:
I remember we had the same problem with Contract::Create
because contract
and policy
are "special" "names". Can you rename Policy
to Bla
or something and see if it helps? If not, try require_dependency
the files directly.
We will push a new loader version soon where this kind of stuff can be easily overridden!
Ah, that makes sense. Ok I called it something else. Thank you :)
This may well be user error, but I've hit a roadblock. When using this folder structure in a Rails 5.1 app, operations cannot be found.
Simple boring controller method like this:
The policy index.rb just looked like this:
That was failing to run, giving
NameError (uninitialized constant Policy::Index):
, until I namespaced them:Changing the reference
Policy::Index
toPolicy::Operations::Index
to match solves this entirely.The README says it should work either way, but im only able to do it namespaced.