Generating restful routes

What am missing here in my routes generation?

routes.rb

map.resources :qualifications do |qualification|
  qualification.resources :details, :controller =>
"qualification_details"
end

output.rhtml

link_to link_name, details_url(:qualification_id => 5, :id => 7)

generated url

http://localhost:3000/qualifications/5/details?id=7 # this is what
comes out
http://localhost:3000/qualifications/5/details/7 # this is what I
want

http://localhost:3000/qualifications/5/details?id=7 # this is what comes out
http://localhost:3000/qualifications/5/details/7 # this is what I want

link_to link_name, detail_url(...)

detail vs details