21
Feb
2007
ActiveRecord finder: Now we can use hash as conditions
Earlier conditions can either be specified as a string or array now in edge rails we can specify hash also. So if we specify conditions as hash then it will generate conditions based on equality with SQL AND.
Example:
will generate SQL as “where `first_name` = ‘akhil’ and `role` = ‘admin’”
Also we can have range as condition
Example:
will generate SQL as “where `access_level` BETWEEN 3 AND 5″
This is really helpful modification in ActiveRecord :-)


Working with Vinsol has been one of the most rewarding and productive collaborations I've ever had in the technology industry. Manik is an intelligent and honest engineer with a great faculty for open and clear communication, and his team include some of the swiftest and keenest developers I've ever had the pleasure to work with. They're great value for money, excellent people who are a joy to know and interact with, and above all they really know their stuff