Project

General

Profile

Actions

Defect #29923

open

Plugin migrations. Load order in plugin.

Added by Alex Alex about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

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:
https://github.com/AlexandruCD/global_wiki/blob/master/init.rb

No data to display

Actions

Also available in: Atom PDF