-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ActionMailer to not use hide_actions
- Loading branch information
Showing
7 changed files
with
40 additions
and
69 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 was deleted.
Oops, something went wrong.
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 | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,5 @@ module AbstractController | |
autoload :Translation | ||
autoload :AssetPaths | ||
autoload :ViewPaths | ||
autoload :UrlFor | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module AbstractController | ||
module UrlFor | ||
extend ActiveSupport::Concern | ||
|
||
include ActionDispatch::Routing::UrlFor | ||
|
||
def _routes | ||
raise "In order to use #url_for, you must include routing helpers explicitly. " \ | ||
"For instance, `include Rails.application.routes.url_helpers" | ||
end | ||
|
||
module ClassMethods | ||
def _routes | ||
nil | ||
end | ||
|
||
def action_methods | ||
@action_methods ||= begin | ||
if _routes | ||
super - _routes.named_routes.helper_names | ||
else | ||
super | ||
end | ||
end | ||
end | ||
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
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