mail_view icon indicating copy to clipboard operation
mail_view copied to clipboard

Catch all route prevents previewing in Rails 4.1

Open mmustala opened this issue 10 years ago • 1 comments

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?

mmustala avatar Jul 04 '14 06:07 mmustala

Just realized one obvious option

get '*path' => 'main#page_not_found' unless Rails.env.development?

mmustala avatar Jul 04 '14 06:07 mmustala