it works the same. I mean, it’s great Rails encode URLs automatically,
but if there is no need (as in this case)…
PT 1: the “manual” URL “queries/vlan_interfaz=Trial” works even thoug
with query params such as “queries/vlan_interfaz=Trial?page=3”. This is
the reason why I say here there is no need in encoding.
PT 1: the “manual” URL “queries/vlan_interfaz=Trial” works even thoug
with query params such as “queries/vlan_interfaz=Trial?page=3”. This
is
the reason why I say here there is no need in encoding.
= is a reserved character in paths according to http://www.ietf.org/rfc/rfc2396.txt
3.3
which probably means you shouldn’t use it like that. ‘It works’ isn’t
usually a good test for these sort of things. You may be relying upon
quirks of one particular web browser, server etc…
Hi all,
yes, you’re right, and I can try with another character.
The thing is that, for example, the character “|” is not a reserved
character in paths (I think), but Rails also encodes it.
maybe it has to do with the routing and the kind of action. eg my
example worked on the index action, which does not need an id parameter.
your sdrs_query_path (singular path) should call the show action and
therefore expect the id as first parameter. in this case it may handle
things different.
or there are differences in the rails versions? i simply can’t reproduce
it in the way it works for you…
My Rails version is 1.2.5. I can reproduce your example programming an
“<a href=…” directly, but not with link_to. Link_to always encode my
characters.
Thorsten M. wrote:
Damaris F. wrote:
I was doing that, but the result of link_to was:
it worked in my case.
did you copy my example?
maybe it has to do with the routing and the kind of action. eg my
example worked on the index action, which does not need an id parameter.
your sdrs_query_path (singular path) should call the show action and
therefore expect the id as first parameter. in this case it may handle
things different.
or there are differences in the rails versions? i simply can’t reproduce
it in the way it works for you…
Yes, I thought I wouldn’t have problems cause I am not using the “?”, so
the “=” sign was not involved in any query variable But well…
Xavier N. wrote:
On Feb 14, 2008, at 13:55 , Damaris F. wrote:
yes, you’re right, and I can try with another character.
The thing is that, for example, the character “|” is not a reserved
character in paths (I think), but Rails also encodes it.
In fact I am not 100% sure it is technically a reserved character
there. Let me explain.
The RFC says you first need to split the URL apart, and then interpret
reserved characters depending on the part of the URL you are dealing
with. My interpretation as far as “=” is concerned is that first you
would split the URL by “?” and then interpret “=” in the query string.
Since AFAIK there’s no special meaning for “=” to the left of the
question mark I think technically it is not required to be escaped.
yes, you’re right, and I can try with another character.
The thing is that, for example, the character “|” is not a reserved
character in paths (I think), but Rails also encodes it.
In fact I am not 100% sure it is technically a reserved character
there. Let me explain.
The RFC says you first need to split the URL apart, and then interpret
reserved characters depending on the part of the URL you are dealing
with. My interpretation as far as “=” is concerned is that first you
would split the URL by “?” and then interpret “=” in the query string.
Since AFAIK there’s no special meaning for “=” to the left of the
question mark I think technically it is not required to be escaped.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.