Skip to content

Commit 230b7e1

Browse files
committed
Better copy and deprecation message
Address comments by @kaspth
1 parent 1af59d2 commit 230b7e1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Also see [Sprockets::Rails::Task](https://github.com/rails/sprockets-rails/blob/
5252

5353
**`config.assets.unknown_asset_fallback`**
5454

55-
When set to a truthy value, the a result will be returned even if the requested asset is not found in the asset pipeline. When set to `false` it will raise an error.
55+
When set to a truthy value, a result will be returned even if the requested asset is not found in the asset pipeline. When set to a falsey value it will raise an error when no asset is found in the pipeline. Defaults to `true`.
5656

5757
**`config.assets.precompile`**
5858

lib/sprockets/rails/helper.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module Sprockets
77
module Rails
88
module Helper
99
class AssetNotFound < StandardError; end
10+
1011
class AssetNotPrecompiled < StandardError
1112
include Sprockets::Rails::Utils
1213
def initialize(source)
@@ -82,8 +83,10 @@ def compute_asset_path(path, options = {})
8283
raise AssetNotFound, message unless unknown_asset_fallback
8384

8485
if respond_to?(:public_compute_asset_path)
85-
message << "The public fallback behavior is being deprecaed and will be removed.\n"
86-
message << "pass in `skip_pipeline: true` instead.\n"
86+
message << "Falling back to an asset that may be in the public folder.\n"
87+
message << "This behavior is deprecated and will be removed.\n"
88+
message << "To bypass the asset pipeline and preserve this behavior,\n"
89+
message << "use the `skip_pipeline: true` option.\n"
8790

8891
call_stack = respond_to?(:caller_locations) ? caller_locations : caller
8992
ActiveSupport::Deprecation.warn(message, call_stack)

0 commit comments

Comments
 (0)