From 5cd7ec2703343d3d17cdfd3a1da7447ecebde6a2 Mon Sep 17 00:00:00 2001 From: Zac Stewart Date: Mon, 27 Mar 2017 10:20:40 -0400 Subject: [PATCH] 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. --- CHANGELOG.md | 2 ++ lib/ember_cli/ember_constraint.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 865eb1dc..4a635407 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ master ------ +* Ignore calls to `/rails/mailers`. [#520] * Call `render` with `html:` instead of `text:`. [#519] * Use `Mime::Type.html?` [#523] +[#520]: https://github.com/thoughtbot/ember-cli-rails/pull/520 [#519]: https://github.com/thoughtbot/ember-cli-rails/pull/519 [#523]: https://github.com/thoughtbot/ember-cli-rails/pull/523 diff --git a/lib/ember_cli/ember_constraint.rb b/lib/ember_cli/ember_constraint.rb index b6ba7e99..be05b6d6 100644 --- a/lib/ember_cli/ember_constraint.rb +++ b/lib/ember_cli/ember_constraint.rb @@ -7,7 +7,7 @@ def matches?(request) private def rails_info_request?(request) - request.fullpath.start_with?("/rails/info") + request.fullpath.start_with?("/rails/info", "/rails/mailers") end def html_request?(request)