Whenever I try to pass an options hash to the link_to method (or url_for, or button_to) I get this error: undefined method `rewrite'' for []:ActionController::Routing::PathSegment::Result The trace ends with /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/base.rb:522:in `url_for'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/helpers/url_helper.rb:27:in `send'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/helpers/url_helper.rb:27:in `url_for'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/helpers/url_helper.rb:75:in `link_to'' url.rewrite is defined in a module named "url_rewriter.rb", so I know it;s there. Why is this happening? -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Figured it out. I had a route with a parameter named ''url''. Apparently, that was confusing Rails; I assume ''url'' is reserved (or at least reserved from a practical point of view). Funny, but testing in console worked fine. This seems like a problem - if it fails in the real world, it should fail in console (else what''s the point of checking your routing in console?). Something similar happened once when I named a model "file". -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---