aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxed.co>2016-11-02 16:07:24 +0000
committerAndrew White <andrew.white@unboxed.co>2016-11-02 16:15:00 +0000
commit2b1ec283d41898cbe1e2f60f72ed40ebc0d2672a (patch)
tree1898738c7a4474700f5afe8ad722ac13cad9db41 /actionpack
parent1f62443319c1b95c6e747a5de5e7e1041c64cbcb (diff)
downloadrails-2b1ec283d41898cbe1e2f60f72ed40ebc0d2672a.tar.gz
rails-2b1ec283d41898cbe1e2f60f72ed40ebc0d2672a.tar.bz2
rails-2b1ec283d41898cbe1e2f60f72ed40ebc0d2672a.zip
Fix File.exists? deprecation warnings in Action Pack
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb2
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb
index 05d5f1870a..edfc374b3b 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb
@@ -47,7 +47,7 @@ module ActionView
if concat || (config.perform_caching && cache)
joined_name = (cache == true ? "all" : cache) + ".#{extension}"
joined_path = File.join((joined_name[/^#{File::SEPARATOR}/] ? config.assets_dir : custom_dir), joined_name)
- unless config.perform_caching && File.exists?(joined_path)
+ unless config.perform_caching && File.exist?(joined_path)
write_asset_file_contents(joined_path, compute_paths(sources, recursive))
end
asset_tag(joined_name, options)
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 243c2e5e50..6712aefb2d 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -163,7 +163,7 @@ module Sprockets
source
elsif source_ext.blank?
"#{source}.#{ext}"
- elsif File.exists?(source) || exact_match_present?(source)
+ elsif File.exist?(source) || exact_match_present?(source)
source
else
"#{source}.#{ext}"