2022-11-28 18:22:50 +01:00
|
|
|
require "merged/version"
|
|
|
|
require "merged/engine"
|
|
|
|
|
|
|
|
module Merged
|
2022-11-30 12:21:06 +01:00
|
|
|
|
2022-12-08 15:34:20 +01:00
|
|
|
def self.load_data
|
2022-12-10 19:29:31 +01:00
|
|
|
# pre-load data
|
|
|
|
Option.all
|
|
|
|
CardStyle.all
|
|
|
|
SectionStyle.all
|
2022-12-10 22:11:17 +01:00
|
|
|
Page.all
|
2022-12-08 15:34:20 +01:00
|
|
|
Image.load_images
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.load_from( kind , path )
|
|
|
|
return unless File.exists?(path)
|
|
|
|
clazz = "Merged::#{kind.camelcase}".constantize
|
|
|
|
clazz.load(YAML.load_file( path ))
|
|
|
|
end
|
2022-11-28 18:22:50 +01:00
|
|
|
end
|