Archive for November, 2007

Giving back to style authors

Monday, November 19th, 2007

As you may have noticed, or may not have if you have some sensible styles, there are text ads all over the site. These ads pay fairly well (especially considering I don’t have to do any work for the money), so I thought I might give back to those who have the site so successful, [...]

Rails, bandwidth, and HTTP content encoding

Tuesday, November 13th, 2007

After moving from Dreamhost to HostingRails I noticed my bandwidth had gone up. On Dreamhost, I was averaging 40GB per month, and on HostingRails, I was averaging 60GB/month. This was a problem because I had bought the 50GB per month plan on HostingRails, and had to either pay extra or let the site go down [...]

PHP includes in Rails

Monday, November 12th, 2007

This is how to include a PHP script inside a Rails template. Got this useful tidbit from Rails Forum. The equivalent of:
<?php include(”path/to/menu.php”); ?>
is
<%=`php path/to/menu.php`%>

Those are back quotes, otherwise known as a capital tilde.
You’ll obviously need PHP installed on your server for this to work.

Adventures in development – Web standards and Firefox extensions