search for: sugarmotor

Displaying 5 results from an estimated 5 matches for "sugarmotor".

2006 Apr 29
3
Geolocation -- hostip.info code for rails
...ect to geolocate IP addresses, making the database freely available. This database allows to translate IP addresses to city/country/longitude and latitude. It can be downloaded from the hostip.info website. They have PHP code so far to make any use of it. My code can be found under http://sugarmotor.net:8080 To test directly go to http://sugarmotor.net:8080/places/ip It''s a simple start. If I get suggestions for changes I''ll apply them before sending the code over to hostip.info. I don''t know how to get rid of the %20, %2C etc. for some city names; these come wit...
2009 Jun 12
5
Limit Request Body Size (Disallow very large File-uploads)
Hello all, For the last couple of days I was trying to get my Apache/mod_proxy/mongrel setup to limit the size of the request body. The setup is as follows: 1.) Apache acts as a reverse proxy by facilitating mod_rewrite and mod_proxy 2.) Requests for non-static files are passed on to a mongrel_cluster 3.) We use mongrel for our Ruby on Rails application Note that due to some restrictions we are
2008 May 06
3
expires header for .css
I''m using mongrel as my http server. I was using yslow to evaluate the performance of my web site and noticed I was downloading the .css file on every request??? I use one .css file for the whole site and I though I would be cached? Yslow indicates that there is no expires date/time set for the css file. How can I tell mongrel to send an expires header with my static content? thanks,
2009 Jan 07
13
HTTP parse error due to an extra percent sign
If you append an extra percent sign to a URL that gets passed to mongrel, it will return a Bad Request error. Kind of odd that "http://localhost/%" causes a "Bad Request" instead of a "Not Found" error. Here is the error from the mongrel log: HTTP parse error, malformed request (127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing fails.>
2006 Jul 02
5
Question about setting field values for a belongs_to model
I have two tables, applicants, and skills where each applicant "has_many" skills, and each skill "belongs_to" an applicant. When I have a reference to an applicant and a (skill) id for one of their skills, I thought to update their skills by using @applicant.skills.find(id_of_skill).description = ''new description'' # even adding