Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/system_pay/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
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
=end

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
end