Open 10xSebastian opened 8 years ago
You may want to add those loaded files into this array and then reloading magic will happens
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/dependencies.rb#L83
I tested it with adding a new method to LHS::Record inheriting model and it was available on the next request.
I'm having similar problems with this:
class Backend::Place < Backend::AuthorizedRecord
endpoint ':datastore/v2/places/:id', auth: { bearer: -> { bearer_token } }
end
class Backend::AuthorizedRecord < LHS::Record
def self.bearer_token
RequestStore.store[:bearer_token]
end
end
When rails is running and LHS::Record classes are changed, the change does not get automatically reloaded.