mail_view
mail_view copied to clipboard
Catch all route prevents previewing in Rails 4.1
Hi,
I'm using Rails 4.1 and have not installed the gem separately. I have a catch all route as the last route in my routes.rb file
get '*path' => 'main#page_not_found'
This catches also the preview path.
What would be the recommended way to implement the catch all route so that it would not conflict with the preview path? Or can I explicitly define the preview path in the route file?
Just realized one obvious option
get '*path' => 'main#page_not_found' unless Rails.env.development?