Closed fernandes closed 8 years ago
I am not sure if it's better to simply do
require_dependency "user/operation/update"
class Enable < User::Update
instead of having to configure the loader. I think the default setup (alphabetical) covers 95% and some manual requires I don't see as a problem?
I was facing some problems using require
, I'm gonna test with require_dependency
and if it persists I reopen, otherwise it's solved... thank you! :)
require_dependency
is the "Rails Way" and registers the constants for reloading, it actually works pretty well!
yeah.. it seems to be working, thanks for the tip ;)
Documented here, BTW :stuck_out_tongue_winking_eye: https://github.com/trailblazer/trailblazer-loader/#debugging
🙇
Problem:
When you have two files like:
and enable inheriting update
I got a
NameError
Workaround
but if rename files to:
it works, I suspect its because Trailblazer::Loader loads in alphabetical order, makes sense?
trailblazer loader loads operation after all, but we are getting the error on
Thing::Enable::Contract
as shown on backtrace belowI'm gonna try to add a test (may I use fakefs on test?) but if you have any suggestion on how to workaround this heheh
Backtrace
ty! 🌹