I have news conroller where news select by year.
in routes.rb I have
get 'news' => 'pages#news'
get 'news/:year' =>'pages#news'
url http://localhost:3000/news/2012
is ok but when I try to create link, it's no pretty.
for example: = link_to year, news_path(year: 2012)
I see http://localhost:3000/news?year=2012
instead http://localhost:3000/news/2012
How I can fix it?
p.s. item it's model for news controller