Open regedarek opened 3 years ago
Hi Regedarek,
After running into problems with annotate
myself – in my case, it was not the multi database setup, but our application's many different directories for models – I have developed a gem which fixes the issues. This gem, datagaze
, is heavily inspired by annotate
, but simply tries to fix the problem you are experiencing. The gem is to be found at: https://github.com/jurriaanschrofer/datagaze.
Basically, annotate's lookup system is often rigid and based on very strict path conventions. Instead, I have found a way of annotating more dynamically, through the use of ruby's const_source_location
method and rails' ApplicationRecord.descendants
.
Would you, if you choose to try the gem out, please reach out to me with feedback? I would love to hear about your experience.
https://guides.rubyonrails.org/active_record_multiple_databases.html
With Rails 6 multiple databases feature, I can't annotate models because they are connected to multiple databases via
connects_to
block.Commands
Errors
Version
latest
latest
latest