Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Markech
refinerycms-news
Commits
09fb5c78
Commit
09fb5c78
authored
Nov 12, 2012
by
Cory Kaufman-Schofield
Browse files
AJ-759 Added regex to news archive route so it returns 404 instead of throwing an exception
parent
401d3ecb
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/routes.rb
View file @
09fb5c78
Refinery
::
Core
::
Engine
.
routes
.
draw
do
Refinery
::
Core
::
Engine
.
routes
.
draw
do
namespace
:news
do
namespace
:news
do
root
:to
=>
"items#index"
root
:to
=>
"items#index"
get
'archive/:year(/:month)'
,
:to
=>
'items#archive'
,
:as
=>
'items_archive'
get
'archive/:year(/:month)'
,
:to
=>
'items#archive'
,
:as
=>
'items_archive'
,
:constraints
=>
{
:year
=>
/\d{4}/
,
:month
=>
/\d{1,2}/
}
resources
:items
,
:only
=>
[
:show
,
:index
],
:path
=>
''
resources
:items
,
:only
=>
[
:show
,
:index
],
:path
=>
''
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment