# Rails 3 routes problem

**URL:** <https://www.ruby-forum.com/t/rails-3-routes-problem/193315>\
**Category:** Rails\
**Created:** [August 15, 2010, 6:34pm UTC](https://www.ruby-forum.com/t/rails-3-routes-problem/193315 "2010-08-15T18:34:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bosko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b77776/32.png) [@bosko](https://www.ruby-forum.com/u/bosko)\
**Post date:** [August 15, 2010, 6:34pm UTC](https://www.ruby-forum.com/t/rails-3-routes-problem/193315/1 "2010-08-15T18:34:15Z")

</div>

I’m trying to port Rails 2 application to Rails 3 and I’ve problem  
with routes. Here is my routes.rb

Enki::Application.routes.draw do  
match ‘/admin/health/:action’ =\> ‘admin/health#index’, :as  
=\> :admin\_health  
match ‘/admin’ =\> ‘admin/dashboard#show’  
match ‘/admin/api’ =\> ‘admin/api#index’  
match ‘/archives/:year/:month’ =\> ‘archives#view’#, :as =\> :archives  
match ‘/archives’ =\> ‘archives#index’, :as =\> :archives  
root :to =\> ‘posts#index’  
resources :posts  
resources :pages  
end

Problem is that empty params hast is passed to the archives\_controller  
when I try to load localhost:3000/archives/2010/02. On the other hand  
if I comment out last route (resources :pages) correct parameters are  
passed. After poking around the code for a few hours I ran out of  
ideas. Obviously I’m missing something but I cannot figure what.

I would appreciate a lot if anyone can tell me what is the reason of  
this strange behavior and why parameters hash is empty with above  
routes.rb file and they are correct {:year =\> ‘2010’, :month =\> '02}  
if last line is commented out?
