views:

21

answers:

0

Hallo

I have a named route:

map.notes '/notes/:id/:from_date/:to_date', :controller => "users", :action => "notes", :defaults => { :from_date => nil, :to_date => nil }

When I create a path for this route in any other model or when using the route without the additional parameters (/notes/1) i get the expected url generated:

notes_path(@user) -> /notes/1

But when proving parameters, the generated path includes the parameters, this is not what I would expect and it doesnt happen in any other routes. For example, when viewing /notes/1/08-08-2010/09-09-2010 any notes_paths generate:

notes_path(@user) -> /notes/1/08-08-2010/09-09-2010

Is here a way to stop including parameters automatically?