Prepare to support ruby 3.3.
This commit is contained in:
parent
9abbb5d09b
commit
565a7fb8e4
|
@ -1,6 +1,7 @@
|
|||
module CustomGallery
|
||||
class Engine < ::Rails::Engine
|
||||
initializer "custom_gallery" do
|
||||
Rails.application.config.to_prepare do
|
||||
begin
|
||||
translate_data = Dir["#{CustomGallery::Engine.root}/config/locales/*.yml"] .map{|yaml_file| YAML.load(File.read(yaml_file))}
|
||||
data = {}
|
||||
|
@ -21,7 +22,7 @@ module CustomGallery
|
|||
puts ['error in custom_gallery',e]
|
||||
end
|
||||
|
||||
require File.expand_path('../../../app/models/custom_album_setting', __FILE__)
|
||||
require File.join(CustomGallery::Engine.root, 'app/models/custom_album_setting')
|
||||
if defined?(CustomAlbumSetting)
|
||||
if CustomAlbumSetting.first.nil?
|
||||
CustomAlbumSetting.create()
|
||||
|
@ -93,3 +94,4 @@ module CustomGallery
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue