Plugin migrations. Load order in plugin.
I am building a simple plugin which allows setting a global wiki on the homepage and also it allows adding custom links in the top menu.
I have 2 problems with it because I use its own model into init.rb file to load data if there is any in its table.
As you can see, I am loading data outside register block, because if I try to do so, I am getting the following error:
uninitialized constant CustomLink (NameError)
If I am trying to load data after the block, the problem is solved. Tho, I can't run plugin migrations as the command that tries to run the migration seem to load init.rb file and says table do not exist.
Any solution? Thanks. This is the plugin: