Skip to content

Commit

Permalink
Fix File.exists? deprecation warnings in Action Pack
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeltrix committed Nov 2, 2016
1 parent 1f62443 commit 2b1ec28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def include_tag(*sources)
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)
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/sprockets/helpers/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def rewrite_extension(source, dir, ext)
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}"
Expand Down

0 comments on commit 2b1ec28

Please sign in to comment.