EppO/rolify — pull request #242 by nagyt234 (2014-04-09 17:00:52+00:00)
Title: Fix select(:id) in active_record/resource_adapterto avoid Mysql2::Error: Column 'id' in field list is ambiguous

I've got the following error with rolify-3.4.0 and rails 4.0.4:
```
ActiveRecord::StatementInvalid: Mysql2::Error: Column 'id' in field list is ambiguous: SELECT `folders`.* FROM `folders` INNER JOIN `roles` ON `roles`.resource_type = 'Folder' AND
(`roles`.resource_id IS NULL OR `roles`.resource_id = `folders`.id) WHERE (`roles`.name IN ('collaborate','informed') AND `roles`.resource_type = 'Folder') AND (`roles`.id IN (SELECT id FROM `roles` INNER JOIN `users_roles` ON `roles`.`id` = `users_roles`.`role_id` WHERE `users_roles`.`user_id` = 2 AND `roles`.`name` IN ('collaborate', 'informed') ORDER BY roles.resource_type, roles.name) AND ((resource_id = `folders`.id) OR (resource_id IS NULL)))
```
It is caused by the changed line. In the generated SQL the problem is ```SELECT id FROM `roles``` in the middle. Please merge the fix.