Skip to content

Commit 8c84034

Browse files
committed
Merge pull request code-dot-org#847 from code-dot-org/preload-models
eager load should be more eager
2 parents 3e2682b + 6f0a1b8 commit 8c84034

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# load all the model classes on startup to avoid problems with Marshal.load
2+
# egrep -r '^class' app/models | cut -d' ' -f2 | ruby -pe '$_ = $_.strip + ",\n"'
3+
[Activity,
4+
ActivityHint,
5+
Artist,
6+
Blockly,
7+
Calc,
8+
Callout,
9+
Concept,
10+
DSLDefined,
11+
Eval,
12+
ExperimentActivity,
13+
Follower,
14+
FrequentUnsuccessfulLevelSource,
15+
Game,
16+
Grid,
17+
Karel,
18+
Level,
19+
LevelSource,
20+
LevelSourceHint,
21+
LevelSourceImage,
22+
Match,
23+
Maze,
24+
Multi,
25+
Prize,
26+
PrizeProvider,
27+
Script,
28+
ScriptLevel,
29+
SecretPicture,
30+
SecretWord,
31+
Section,
32+
Stage,
33+
Studio,
34+
TeacherBonusPrize,
35+
TeacherPrize,
36+
TextMatch,
37+
Trophy,
38+
Unplugged,
39+
User,
40+
UserLevel,
41+
UserScript,
42+
UserTrophy,
43+
Video].each(&:new) if Dashboard::Application.config.eager_load

0 commit comments

Comments
 (0)