Prepare to support ruby 3.3.

This commit is contained in:
邱博亞 2024-02-24 20:49:09 +08:00
parent d4d1e65a6d
commit fbb2b30d66
1 changed files with 94 additions and 92 deletions

View File

@ -1,6 +1,7 @@
module Gallery module Gallery
class Engine < ::Rails::Engine class Engine < ::Rails::Engine
initializer "gallery" do initializer "gallery" do
Rails.application.config.to_prepare do
begin begin
translate_data = Dir["#{Gallery::Engine.root}/config/locales/*.yml"] .map{|yaml_file| YAML.load(File.read(yaml_file))} translate_data = Dir["#{Gallery::Engine.root}/config/locales/*.yml"] .map{|yaml_file| YAML.load(File.read(yaml_file))}
data = {} data = {}
@ -100,3 +101,4 @@ module Gallery
end end
end end
end end
end