Why does the following rails statement
User.find(:all, :joins => [:roles,:roles_users],
:conditions => { :roles => { :name => 'subscriber',
:authorizable_id => self.id,
:authorizable_type => self.class.to_s }})
Translates into this (with 2x the same join)
SELECT "users".* FROM "users"
JOIN "roles_users" ON ("users"."id" = "roles_users"."user_id")
JOIN "roles" ON ("roles"."id" = "roles_users"."role_id")
JOIN "roles_users" roles_users_users ON roles_users_users.user_id = users.id
WHERE ("roles"."authorizable_id" = 4 AND "roles"."name" = 'subscriber' AND "roles"."authorizable_type" = 'Howto')
Just curious.