diff --git a/lib/rolify/adapters/active_record/resource_adapter.rb b/lib/rolify/adapters/active_record/resource_adapter.rb index c3dee94f..b1c5a213 100644 --- a/lib/rolify/adapters/active_record/resource_adapter.rb +++ b/lib/rolify/adapters/active_record/resource_adapter.rb @@ -21,7 +21,6 @@ def resources_find(roles_table, relation, role_name) resources = relation.joins("INNER JOIN #{quote_table(roles_table)} ON #{quote_table(roles_table)}.resource_type IN (#{relations}) AND (#{quote_table(roles_table)}.resource_id IS NULL OR #{quote_table(roles_table)}.resource_id = #{quote_table(relation.table_name)}.#{quote_column(relation.primary_key)})") resources = resources.where("#{quote_table(roles_table)}.name IN (?) AND #{quote_table(roles_table)}.resource_type IN (?)", Array(role_name), klasses) - resources = resources.select("#{quote_table(relation.table_name)}.*") resources end