Ambition: This Is Very Very Cool
Ambition is a very cool Ruby to SQL API (built on ParseTree, itself also very very cool) for ActiveRecord allowing you to generate and execute SQL using methods from the Enumerable mixin. Some examples:
User.first “SELECT * FROM users LIMIT 1" User.select { |m| m.name != ‘macgyver’ } “SELECT * FROM users WHERE users.`name` <> ’macgyver’" User.select { |u| u.email =~ /chris/ }.first “SELECT * FROM users WHERE (users.`email` REGEXP ‘chris’) LIMIT 1Aimred is a specialist Ruby and Ruby on Rails development house and consultancy based in Cape Town, South Africa.