You are absolutely right.

On Jan 11, 1:01 pm, Marnen Laibow-Koser <[email protected]> wrote:
> Martin Streicher wrote:
> > I am trying to generate a path for a route with requirements. The
> > route looks like this...
>
> > map.courses_image_cache '/courses/image_cache',
> >     :controller => 'courses', :action => 'image_cache',
> >     :requirements => {
> >       :cache_id => /\d{8}-\d{4}-\d{5}-\d{4}/,
> >       :filename => /[a-zA-Z0-9_ ]+\.(jpg|jpeg|png|gif){1}/i }
>
> > And I call it as
>
> > courses_image_cache_path(:cache_id =>
> > '20100111-0332-76263-6402', :filename => 'letter.png' )
>
> > But the result is the path
> > "/courses/image_cache"
>
> > Why does the result NOT include the params?
>
> Because the route has no way of knowing where you wanted the params.
> Perhaps you wanted '/courses/image_cache/:filename/:cache_id' in your
> map statement?
>
>
>
> > The params match, but no params in the resulting URL... or is that
> > intentional, like the keys to the kingdom?
>
> > Ideas? Help?
>
> > Martin
>
> Best,
> -- 
> Marnen Laibow-Koserhttp://www.marnen.org
> [email protected]
> --
> Posted viahttp://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to