File tree Expand file tree Collapse file tree 2 files changed +0
-33
lines changed Expand file tree Collapse file tree 2 files changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,6 @@ def initialize(source)
15
15
end
16
16
end
17
17
18
- class AssetAliasUsed < StandardError
19
- def initialize ( actual , expected )
20
- msg = "Asset was linked to from an alias rather than its exact path. " +
21
- "Alias resolving may not be available in production.\n " +
22
- "Use #{ expected . inspect } instead of #{ actual . inspect } "
23
- super ( msg )
24
- end
25
- end
26
-
27
18
include ActionView ::Helpers ::AssetUrlHelper
28
19
include ActionView ::Helpers ::AssetTagHelper
29
20
@@ -89,10 +80,6 @@ def asset_digest_path(path, options = {})
89
80
if environment = assets_environment
90
81
if asset = environment [ path ]
91
82
unless options [ :debug ]
92
- if path != asset . logical_path
93
- raise AssetAliasUsed . new ( path , asset . logical_path )
94
- end
95
-
96
83
if !precompiled_assets . include? ( asset )
97
84
raise AssetNotPrecompiled . new ( asset . logical_path )
98
85
end
Original file line number Diff line number Diff line change @@ -664,26 +664,6 @@ def test_precompile_allows_links
664
664
end
665
665
end
666
666
667
- def test_asset_path_with_index_requires_exact_logical_path
668
- @view . assets_precompile = [ "bundle.js" ]
669
-
670
- assert @view . asset_path ( "bundle.js" )
671
-
672
- assert_raises ( Sprockets ::Rails ::Helper ::AssetAliasUsed ) do
673
- assert @view . asset_path ( "bundle/index.js" )
674
- end
675
- end
676
-
677
- def test_asset_path_with_bower_requires_exact_logical_path
678
- @view . assets_precompile = [ "jquery/jquery.js" ]
679
-
680
- assert @view . asset_path ( "jquery/jquery.js" )
681
-
682
- assert_raises ( Sprockets ::Rails ::Helper ::AssetAliasUsed ) do
683
- assert @view . asset_path ( "jquery.js" )
684
- end
685
- end
686
-
687
667
def test_links_image_target
688
668
assert_match "logo.png" , @assets [ 'url.css' ] . links . to_a [ 0 ]
689
669
end
You can’t perform that action at this time.
0 commit comments