Skip to content

Commit 5cd7ec2

Browse files
zacstewartseanpdoyle
authored andcommitted
Ignore /rails/mailers in route constraint
In addition to calls to `/rails/info`, ignore calls to `/rails/mailers`. If a third `/rails` sub route becomes an issue, consider ignoring all `/rails/*` routes.
1 parent 585cfea commit 5cd7ec2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
master
22
------
33

4+
* Ignore calls to `/rails/mailers`. [#520]
45
* Call `render` with `html:` instead of `text:`. [#519]
56
* Use `Mime::Type.html?` [#523]
67

8+
[#520]: https://github.com/thoughtbot/ember-cli-rails/pull/520
79
[#519]: https://github.com/thoughtbot/ember-cli-rails/pull/519
810
[#523]: https://github.com/thoughtbot/ember-cli-rails/pull/523
911

lib/ember_cli/ember_constraint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def matches?(request)
77
private
88

99
def rails_info_request?(request)
10-
request.fullpath.start_with?("/rails/info")
10+
request.fullpath.start_with?("/rails/info", "/rails/mailers")
1111
end
1212

1313
def html_request?(request)

0 commit comments

Comments
 (0)