-
Notifications
You must be signed in to change notification settings - Fork 21.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
let mailer templates generate URLs by default [Xavier Noria, Richard …
…Schneeman]
- Loading branch information
Showing
7 changed files
with
107 additions
and
12 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
1 change: 1 addition & 0 deletions
1
actionmailer/test/fixtures/url_test_mailer/exercise_url_for.erb
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 @@ | ||
<%= url_for(@options) %> <%= @url %> |
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 | Diff line number | Diff line change |
---|---|---|
|
@@ -457,7 +457,7 @@ def #{name} | |
RUBY | ||
end | ||
|
||
def url_helpers(include_path_helpers = true) | ||
def url_helpers(supports_path = true) | ||
routes = self | ||
|
||
Module.new do | ||
|
@@ -484,7 +484,7 @@ def url_options; {}; end | |
# named routes... | ||
include url_helpers | ||
|
||
if include_path_helpers | ||
if supports_path | ||
path_helpers = routes.named_routes.path_helpers_module | ||
else | ||
path_helpers = routes.named_routes.path_helpers_module(true) | ||
|
@@ -502,6 +502,10 @@ def url_options; {}; end | |
# UrlFor (included in this module) add extra | ||
# conveniences for working with @_routes. | ||
define_method(:_routes) { @_routes || routes } | ||
|
||
define_method(:_generate_paths_by_default) do | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rafaelfranca
via email
Member
|
||
supports_path | ||
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
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
1 comment
on commit 9685080
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ ❤️ ❤️ thanks for your work on this.
This method is being returned in the
MyController.action_methods
set, as it is being defined as a public method - just noticed this through the Devise test suite.Should we just add a
private : _generate_paths_by_default
right after thisdefined_method
call?