Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dependency on actionpack in ActionView::AssetPaths
Since Action View should not depend on actionpack, it's best to delegate invalid_asset_host! to controller and just rely on such simple contract instead of raising ActionController::RoutingError directly.
- Loading branch information
Showing
4 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
require 'action_controller/metal/exceptions' | |||
|
|||
module ActionController | |||
module AssetPaths | |||
extend ActiveSupport::Concern | |||
|
|||
included do | |||
include AbstractController::AssetPaths | |||
end | |||
|
|||
def invalid_asset_host!(help_message) | |||
raise ActionController::RoutingError, "This asset host cannot be computed without a request in scope. #{help_message}" | |||
end | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters