Rails 2.x
Right.find_by_site_id_and_user_id(Site.find(1), User.new)
Generated query:
SELECT * FROM `rights` WHERE (`rights`.`site_id` = 1 AND `rights`.`user_id` = NULL) LIMIT 1
Rails 3.x
SELECT `rights`.* FROM `rights` WHERE `rights`.`site_id` = 1 AND `rights`.`user_id` IS NULL LIMIT 1