Browse Source

fix eval_pattern

master
Georg Hopp 15 years ago
committed by Georg Hopp
parent
commit
b0a176cf1c
  1. 3
      app/storage/config.rb

3
app/storage/config.rb

@ -28,7 +28,8 @@ class DsAdmin::Storage::Config
result = String.new
pattern.scan(scan_exp) do |m|
key = m[2][1..m[2].length].to_sym if m[2]
val = eval('"' + data[key] + '".send ' + m[4]) if data[key] && m[4]
val = data[key] if data[key]
val = eval('"' + val + '".send ' + m[4]) if val && m[4]
result += m[0] + (val || "")
end

Loading…
Cancel
Save