Skip to content

Commit d7ad894

Browse files
author
Dan Kang
committed
alias path_to_asset to asset_path with error checking
1 parent f591c12 commit d7ad894

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/sprockets/rails/helper.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,9 @@ def compute_asset_path(path, options = {})
7171
# method checks for errors before returning path.
7272
def asset_path(source, options = {})
7373
check_errors_for(source, options)
74-
path_to_asset(source, options)
75-
end
76-
alias :path_to_asset_with_errors :asset_path
77-
78-
# Computes the full URL to a asset in the public directory. This
79-
# will use +asset_path+ internally, so most of their behaviors
80-
# will be the same.
81-
def asset_url(source, options = {})
82-
path_to_asset_with_errors(source, options.merge(:protocol => :request))
74+
super(source, options)
8375
end
76+
alias :path_to_asset :asset_path
8477

8578
# Get digest for asset path.
8679
#

0 commit comments

Comments
 (0)