silly me, i always had the impression that i could only pass 1. i guess
i dont have to use sessions after all for my site. is there anything
wrong with this?
basically instead of the user filling out forms(drop down boxes, radio
boxes etc), i just what them to click on links that gets passed to the
contoller etc…and depending on what the selected, that will be used
for the query. is there anything wrong with this approach?
silly me, i always had the impression that i could only pass 1. i guess
i dont have to use sessions after all for my site. is there anything
wrong with this?
basically instead of the user filling out forms(drop down boxes, radio
boxes etc), i just what them to click on links that gets passed to the
contoller etc…and depending on what the selected, that will be used
for the query. is there anything wrong with this approach?
thanks.
it’s a fine approach, but just remember that if you don’t define what to
do with :id2 in routes.rb, then your url will look something like this:
Not really anything technically wrong with the approach but I’ll mention
a
few things that jump out right away:
There is a limit to how long a URL can be… I believe 255 characters
max.
Also, you don’t want anything in there that can be private data, like
passwords.
Also keep in mind that it’s easier for people to manipulate URLs than it
is
to manipulate form data (neither is really that hard) so you may have
users
‘exploring’ around your site more than normal.
I don’t recommend this approach though because it’s really not that
flexible. See how far you get though.
" The HTTP protocol does not place any a priori limit on the length of a
URI. Servers MUST be able to handle the URI of any resource they serve,
and SHOULD be able to handle URIs of unbounded length if they provide
GET-based forms that could generate such URIs. A server SHOULD return
414 (Request-URI Too Long) status if a URI is longer than the server can
handle (see section 10.4.15).
Note: Servers ought to be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy
implementations might not properly support these lengths.
"
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.