I solved the problem: the url generated by javascript was "login/
messages" instead of "/login/messages" . (the machine_name and
portname was left out). The older version of Rails was just more
''forgiving''
On Mar 29, 8:54 pm, "hansman"
<hans.ziets...-WS9iIfL37Pn3fQ9qLvQP4Q@public.gmane.org>
wrote:> Very frustrated. I recently upgraded from earlier Rails version to new
> one (1.2.3). On the new version Rails (or webrick, not sure) messes up
> or rewrites incorrecly a url provided by javascript:
>
> I have a simple piece of javascript, firing on an image click that
> loads a document in an i frame. The url navigation code is simply:
> window.location.href = "http://localhost:3000/login/messages" .
> (machine name:port name is variable of course) Rails then (used to for
> last 6 months)
> call the ''messages'' method on the
''login'' controller, which then ''does
> its thing''. Always worked perfectly. No matter how many times I
click
> the relevant image the same controller method ''messages''
is called and
> everything works perfectly. Now Rails(version 1.2.3) somehow generates
> the following url: "http://localhost:3000/login/login/messages"
which
> results in rails thinking ''messages'' is an id an
''login'' a controller
> method. From the javascript I definitely DO NOT give it this url + I
> do not do anything further with it- including the server side. Just
> before the ''window.location.href ='' part, I use an alert
to check the
> url and it is correct. So this is my problem. I also discovered that
> if I click it again, the login part is appended again, i.e it becomes
> "http://localhost:3000/login/login/login/messages". The exact
same
> code that works previously does not now. The only problem is the fact
> that, without my intervention a url becomes something else. I know it
> is not a browser issue.
> So if anyone can help, it would be great. It would also be useful for
> me to find webrick''s log file. Where is it stored on windows?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---