Commit 09fb5c78 authored by Cory Kaufman-Schofield's avatar Cory Kaufman-Schofield
Browse files

AJ-759 Added regex to news archive route so it returns 404 instead of throwing an exception

parent 401d3ecb
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment