diff --git a/lib/system_pay/railtie.rb b/lib/system_pay/railtie.rb index 5196eda..0089f95 100644 --- a/lib/system_pay/railtie.rb +++ b/lib/system_pay/railtie.rb @@ -5,11 +5,11 @@ module SystemPay class Railtie < ::Rails::Railtie initializer "system_pay.form_helper" do - ActiveSupport.on_load(:action_controller) do + ActiveSupport.on_load(:action_controller) do helper SystemPay::FormHelper end -=begin +=begin config.to_prepare do self.setup! # &method(:activate).to_proc end @@ -17,11 +17,11 @@ class Railtie < ::Rails::Railtie system_pay_config_file = File.join(Rails.root,'config','system_pay.yml') raise "#{system_pay_config_file} is missing!" unless File.exists? system_pay_config_file - system_pay_config = YAML.load_file(system_pay_config_file)[Rails.env].symbolize_keys + system_pay_config = YAML.load(ERB.new(IO.read(system_pay_config_file)).result)[Rails.env].symbolize_keys system_pay_config.each_pair do |n, v| SystemPay::Vads.class_variable_set("@@#{n}", v) end end end -end \ No newline at end of file +end