aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorCliff Pruitt <cliff.pruitt@cliffpruitt.com>2019-04-01 19:29:03 -0400
committerCliff Pruitt <cliff.pruitt@cliffpruitt.com>2019-04-01 19:29:03 -0400
commit90196398a14896e6a279cbbaa6651861360abc0f (patch)
tree4437b7c480a3d21c61764067d1319527c66eb9fa /actionview
parentbeb0bc9907a31d0cbd2ca68c79c57a9e375761e8 (diff)
downloadrails-90196398a14896e6a279cbbaa6651861360abc0f.tar.gz
rails-90196398a14896e6a279cbbaa6651861360abc0f.tar.bz2
rails-90196398a14896e6a279cbbaa6651861360abc0f.zip
Rename File to RawFile
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/file_template.rb2
-rw-r--r--actionview/lib/action_view/renderer/template_renderer.rb2
-rw-r--r--actionview/lib/action_view/template.rb2
-rw-r--r--actionview/lib/action_view/template/error.rb2
-rw-r--r--actionview/lib/action_view/template/raw_file.rb (renamed from actionview/lib/action_view/template/file.rb)2
5 files changed, 5 insertions, 5 deletions
diff --git a/actionview/lib/action_view/file_template.rb b/actionview/lib/action_view/file_template.rb
index e0dc7da3b6..dea02176eb 100644
--- a/actionview/lib/action_view/file_template.rb
+++ b/actionview/lib/action_view/file_template.rb
@@ -11,7 +11,7 @@ module ActionView
end
def source
- ::File.binread @filename
+ File.binread @filename
end
def refresh(_)
diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb
index 698f535b49..1faef9ca81 100644
--- a/actionview/lib/action_view/renderer/template_renderer.rb
+++ b/actionview/lib/action_view/renderer/template_renderer.rb
@@ -27,7 +27,7 @@ module ActionView
Template::HTML.new(options[:html], formats.first)
elsif options.key?(:file)
if File.exist?(options[:file])
- Template::File.new(options[:file])
+ Template::RawFile.new(options[:file])
else
ActiveSupport::Deprecation.warn "render file: should be given the absolute path to a file"
@lookup_context.with_fallbacks.find_file(options[:file], nil, false, keys, @details)
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb
index ebe52532d6..94f8a194a0 100644
--- a/actionview/lib/action_view/template.rb
+++ b/actionview/lib/action_view/template.rb
@@ -113,7 +113,7 @@ module ActionView
eager_autoload do
autoload :Error
- autoload :File
+ autoload :RawFile
autoload :Handlers
autoload :HTML
autoload :Inline
diff --git a/actionview/lib/action_view/template/error.rb b/actionview/lib/action_view/template/error.rb
index aace0be04d..d0ea03e228 100644
--- a/actionview/lib/action_view/template/error.rb
+++ b/actionview/lib/action_view/template/error.rb
@@ -104,7 +104,7 @@ module ActionView
def line_number
@line_number ||=
if file_name
- regexp = /#{Regexp.escape ::File.basename(file_name)}:(\d+)/
+ regexp = /#{Regexp.escape File.basename(file_name)}:(\d+)/
$1 if message =~ regexp || backtrace.find { |line| line =~ regexp }
end
end
diff --git a/actionview/lib/action_view/template/file.rb b/actionview/lib/action_view/template/raw_file.rb
index 487e5735cf..61818ba52f 100644
--- a/actionview/lib/action_view/template/file.rb
+++ b/actionview/lib/action_view/template/raw_file.rb
@@ -3,7 +3,7 @@
module ActionView #:nodoc:
# = Action View File Template
class Template #:nodoc:
- class File #:nodoc:
+ class RawFile #:nodoc:
attr_accessor :type, :format
def initialize(filename)