Sha256: 86a444c016673dcdc7dbe47f4ac4d191dda3cd2d0a5c1dfec219dacd1ad90f0b
Contents?: true
Size: 389 Bytes
Versions: 2
Compression:
Stored size: 389 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.3.0 | lib/generators/yaml_config_file/templates/config_file.rb |
yaml_config_file-0.2.3 | lib/generators/yaml_config_file/templates/config_file.rb |