Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Catch all route prevents previewing in Rails 4.1 #79

Open
mmustala opened this issue Jul 4, 2014 · 1 comment
Open

Catch all route prevents previewing in Rails 4.1 #79

mmustala opened this issue Jul 4, 2014 · 1 comment

Comments

@mmustala
Copy link

mmustala commented Jul 4, 2014

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
Copy link
Author

mmustala commented Jul 4, 2014

Just realized one obvious option

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant