I’m guessing that having .com at the end of the URL is causing your
browser to attempt to process/download a file of type com. I would say
avoid storing the company name with the .com or replace the dot with
something more safe like Amazon-com or Amazon_com or something like
that within the URL. You want to make sure the web server and/or the
client browser does not interpret the .com as a file extension.
Or the simple solution is to just use the id of the row in the URL and
not worry about having the name there at all. Unless you expect the
end users to find your resources by typing in the full URL to them,
what difference does it make whether the URL is /company-profile/
Amazon.com or simply /companies/15? At least with the latter this
becomes a complete non-issue. There could be all sorts of “illegal”
characters that could appear in company names besides the dot. What
would happen with something like AT&T for example? Maybe it would
work, but who knows.
I personally prefer my URLs in the standard REST conventional way: /
users/5, /companies/35. This is of course unless I really want to
provide useful permalinks when it makes sense to do so. Something
I’m guessing you’re not expecting your end users to have to find
companies in your catalog by typing in:
I would guess the user would instead click on a “Company Catalog” link
and be presented with a page full of links to the various companies in
the catalog. Where in that process would the end user care anything
about what shows up in their address bar in the browser?
It seems sometimes that programmers put more work on themselves for
virtually no benefit when the end user could care less.
On Jul 25, 9:05 am, Sandeep G. <rails-mailing-l…@andreas-