mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
use binread to read the files
This commit is contained in:
parent
681bf1fc48
commit
0155bf4021
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
require "pathname"
|
||||
require "active_support/core_ext/class"
|
||||
require "active_support/core_ext/io"
|
||||
require "action_view/template"
|
||||
|
||||
module ActionView
|
||||
|
@ -137,7 +138,7 @@ module ActionView
|
|||
next if File.directory?(p) || !sanitizer[p].include?(p)
|
||||
|
||||
handler, format = extract_handler_and_format(p, formats)
|
||||
contents = File.open(p, "rb") { |io| io.read }
|
||||
contents = File.binread p
|
||||
|
||||
templates << Template.new(contents, File.expand_path(p), handler,
|
||||
:virtual_path => path.virtual, :format => format, :updated_at => mtime(p))
|
||||
|
|
Loading…
Reference in a new issue