This is in the production version, 1.16, NOT in the 1.2RC.
I’m having severe problems generating more than one URL per request. For
example,
@url = url_for(‘action’ => ‘accept_invitation’, ‘conf’ => conf)
@block_url = url_for(‘action’ => ‘block_email’, ‘conf’ => em)
(where “conf” is a Base64-encoded string)
If I call the first one first, the second one throws an exception of the
general form:
Exception: undefined method rewrite' for "http://localhost:3000/accept_invite/bW9hdEBmbG9hdC5jb20%3D":String /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:488:in
url_for’
/Users/al/Development/RyanKoonce/WheresYourDollar/public/…/config/…/app/controllers/members_controller.rb:354:in
`block_email_url’
Yes, the string which has the “undefined method ‘rewrite’” is the first
URL I generated.
If I switch the order and call the second one first, both work. Once.
But if I’m generating a number of URLs, the next call to either one
throws the same exception.
The only workaround I’ve found is using something like…
@url = “http://” + request.host_with_port + “/accept_invite/” + conf
…which sucks:-)
Is there some kind of magic incantation I’m missing to “reset” url_for?
–Al Evans