Sha256: e8482abbc1924680557672409deb9f11b6bc60a10acbc186371e8df1e83dbcd7
Contents?: true
Size: 372 Bytes
Versions: 2
Compression:
Stored size: 372 Bytes
Contents
# Initializer to load the YAML configuration file from config/<%= gen_file_name %> require 'yaml' require 'erb' <%= gen_file_name %>_yml = YAML.load(ERB.new(File.read(File.join(Rails.root, "config", "<%= gen_file_name %>.yml"))).result) <%= gen_file_name.upcase %> = <%= gen_file_name %>_yml["global"].merge!(<%= gen_file_name %>_yml[Rails.env]).with_indifferent_access
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yaml_config_file-0.2.2 | lib/generators/yaml_config_file/templates/config_file.rb |
yaml_config_file-0.2.0 | lib/generators/yaml_config_file/templates/config_file.rb |