diff options
author | wycats <wycats@gmail.com> | 2010-05-17 19:41:54 +0400 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-05-17 19:41:54 +0400 |
commit | 80b60671f7216c571ea8711d1de8ca824aefbe54 (patch) | |
tree | c84be59be24bbd978b257ac526eb9b0f9051389f /actionpack/lib/action_view/template/resolver.rb | |
parent | 5371242384171dc0255716e31e9257ddeec17d10 (diff) | |
download | rails-80b60671f7216c571ea8711d1de8ca824aefbe54.tar.gz rails-80b60671f7216c571ea8711d1de8ca824aefbe54.tar.bz2 rails-80b60671f7216c571ea8711d1de8ca824aefbe54.zip |
Revert "Moved encoding work in progress to a feature branch."
This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
Diffstat (limited to 'actionpack/lib/action_view/template/resolver.rb')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index a223b3a55f..ef44925951 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -70,7 +70,10 @@ module ActionView Dir[query].reject { |p| File.directory?(p) }.map do |p| handler, format = extract_handler_and_format(p, formats) - Template.new(File.read(p), File.expand_path(p), handler, + + contents = File.open(p, "rb") {|io| io.read } + + Template.new(contents, File.expand_path(p), handler, :virtual_path => path, :format => format) end end |