> What's the error that you see,  url_for should just return the string
> shouldn't it?

The error is "can't convert String into Hash." If I understand 
correctly, it's caused by a namespace collision due to the order of 
includes:

> include ActionView::Helpers::UrlHelper  # provides link_to (and also url_for)
> include ActionController::UrlWriter  # provides url_for 

So ActionView's link_to method actually calls ActionController's url_for 
directly, instead of the one that it itself defines.

Before the commit that I mentioned, this wasn't a problem, because both 
versions of url_for handled strings. The commit DRYs things up nicely 
for normal usage.

Finally, I don't think you can switch around the order of the includes, 
because ActionView's url_for depends on ActionController's url_for.

Thanks for your reply!

Seamus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to