Skip to content

Commit

Permalink
wrap initialization in reloader.to_prepare to avoid autoload deprecat…
Browse files Browse the repository at this point in the history
…ion warning in some cases
  • Loading branch information
jrochkind committed Jan 26, 2022
1 parent f62a2d1 commit 8f8dd7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config/initializers/authorities.rb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Qa::Authorities::Local.load_config(File.expand_path("../../authorities.yml", __FILE__))
Rails.application.reloader.to_prepare do
Qa::Authorities::Local.load_config(File.expand_path("../../authorities.yml", __FILE__))
end
4 changes: 3 additions & 1 deletion config/initializers/linked_data_authorities.rb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Qa::LinkedData::AuthorityService.load_authorities
Rails.application.reloader.to_prepare do
Qa::LinkedData::AuthorityService.load_authorities
end

0 comments on commit 8f8dd7e

Please sign in to comment.