Commit 14d3688
authored
Defer loading SettingObject until ActiveRecord is loaded (#119)
The gem was requiring `rails-settings/setting_object` at the top level,
which defines an ActiveRecord::Base subclass and causes ActiveRecord
to load too early. This interferes with Rails’ lazy-loading behavior (eg.
preventing new framework defaults from being applied correctly).
Moving the require statement into the `ActiveSupport.on_load(:active_record)`
block ensures it loads only when ActiveRecord is ready.1 parent 8a18af8 commit 14d3688
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
0 commit comments