Unfair Windows Hate

I must say that I had never used (as in for development) Mac so far, though I am getting a mini soon. I hope it can live up to its hype that I get to hear on the #rubyonrails room. But then, why do they all hate windows so much? I never get to hear a proper reason. Perhaps it is cool to say Mac is great and Windows is not.

Anyway, windows had worked for me brilliantly; MS-Office automation on its own makes it all worth while. It is far more popular than any other OS is today. For some rare glitches, I think it is unfair for people to look down on windows users. I hope people realise the purpose of their tools to use it accordingly and stop making lame comments.


Friendly URI — Opposite

I am a fan of friendly URI but, seems like HSBC is quite an opposite of me.


Comments (2)

Sub-domains and Developer Testing

Sometimes you sell accounts to your web application with unique sub-domain per license. This is a neat way of handling accounts and gives you lot control.

For e.g. lets say you have built hotel-reservations-engine in Ruby on Rails and are planning to license it for many different hotels. The best way to do that would be use sub-domains to your advantage. There are many blog posts that tells you how to achieve this on Ruby On Rails and the production server.

My focus is though, how to get this working in your developer machine without any dilly-dally of hosts file.

Use Name Server To Your Advantage:

For e.g. lets say you manage your DNS records with tinydns which has a great feature of wild-card alias, and you add the following entries…


after propagation its all yours:

local.example.com =>
sub1.local.example.com =>
sub2.local.example.com =>
sub3.local.example.com =>

Note the * in the +*.local.example.com: which does the trick.

No more editing the hosts file, and it works for all developers pointing to their own machine. Nice!


Rails plugin restful_authentication a misnomer

It all started with a debate on #rubyonrails with ReinH about how less RESTful a session could be — mainly because it uses cookies. I suggested a resource such as:


or even this…


…could be RESTful. Which ReinH neither agreed nor denied as far as I remember and asked “how many actually do this?”. Fairly none and agreed that he was right. I must really be honest and admit that I only knew a little about REST while debating.

Read the rest of this entry »


Rails Patch: validates_format_of doc missing allow_blank

Added a doc patch to the rails trac today to add the missing doc for allow_blank option in the validates_format_of.

Nothing big, but I noticed people asking question about this in the #rubyonrails.

Looks like this option is missing in many other validation methods, someone or I should submit another patch fixing them all.


Rails Plugin: Google Charts On Rails

Google recently made the API for google charts public. It takes parameters using URL query strings and returns png image for the chart.

What we have here is a small wrapper plugin in rails for the google charts.

It is simple to use:


would create something like this:

a sample pie chart

For more usage, visit the Google charts on Rails project.

Comments (6)

Rails: customising URL Path for map.resources

A rails patch that would help in customising the URL generated from the mapped resources.

Read the rest of this entry »


« Previous Page « Previous Page Next entries »