Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use email preview together with catch all route

If I add a catch all route in my routes file I cannot anymore access the email preview paths because they are appended to the routes and there fore defined after my catch all route.

How to solve this so that I can use email preview and have catch all route?

like image 357
Mika Avatar asked Aug 14 '14 12:08

Mika


1 Answers

Add these routes in your routes.rb before the catch all route.

get '/rails/mailers'         => "rails/mailers#index"
get '/rails/mailers/*path'   => "rails/mailers#preview"
like image 125
Mika Avatar answered Nov 08 '22 15:11

Mika