Permalink
Browse files

Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

  • Loading branch information...
distler committed Jul 11, 2017
2 parents cdbe476 + e9afd4b commit b2078a3b4a8d8b71b6b703664002ee083c3c2f46
Showing with 3 additions and 1 deletion.
  1. +3 −1 vendor/rails/railties/lib/rails_generator/commands.rb
@@ -299,7 +299,9 @@ def template(relative_source, relative_destination, template_options = {})
# Evaluate any assignments in a temporary, throwaway binding.
vars = template_options[:assigns] || {}
b = template_options[:binding] || binding
vars.each { |k,v| eval "#{k} = vars[:#{k}] || vars['#{k}']", b }
#vars.each { |k,v| eval"#{k} = vars[:#{k}] || vars['#{k}']", b }
vars.each { |k,v| eval("#{k} = '#{v}'", b) }
eval("attributes ||= {}", b)
# Render the source file with the temporary binding.
ERB.new(file.read, nil, '-').result(b)

0 comments on commit b2078a3

Please sign in to comment.