Skip to content

Commit

Permalink
Ignore /rails/mailers in route constraint
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zacstewart authored and seanpdoyle committed May 12, 2017
1 parent 585cfea commit 5cd7ec2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/ember_cli/ember_constraint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5cd7ec2

Please sign in to comment.