Add redirect for /styleguide

Adds a development-only route for `/styleguide` as an alias to
`/assets/styleguide.html`.
This commit is contained in:
Oliver Günther
2016-04-25 21:26:51 +02:00
parent e49c163d00
commit e25d9764a1
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -573,4 +573,9 @@ OpenProject::Application.routes.draw do
get '/robots' => 'homescreen#robots', defaults: { format: :txt }
root to: 'account#login'
# Development route for styleguide
if Rails.env.development?
get '/styleguide' => redirect('/assets/styleguide.html')
end
end
+1 -1
View File
@@ -37,4 +37,4 @@ On the Rails side, both frameworks are included as gems - see the `./Gemfile` -
## Living Styleguide
The styleguide is rendered as part of the Rails stack at `/assets/styleguide.html`. Please see [their GitHub](https://github.com/livingstyleguide/livingstyleguide) for more information.
The styleguide is rendered as part of the Rails stack at `/styleguide` (`RAILS_ENV=development` only). Please see [their GitHub](https://github.com/livingstyleguide/livingstyleguide) for more information.
+1 -1
View File
@@ -8,7 +8,7 @@ once webpack has completed.
## Living Style Guide
The style guide is available as part of the Rails development server at: <http://localhost:5000/assets/styleguide.html>.
The style guide is available as part of the Rails development server at: <http://localhost:5000/styleguide>.
## Changing or updating Dependencies