Topic: Rails: apply where conditions to both model and associations

Hello, in my app I have the models Item, Category and Categorization defined as above:

class Item < ActiveRecord::Base
      attr_accessible :name, :description, :property_valuations, :barcode

      has_many :categorizations
      has_many :categories, :through => :categorizations
    end

    class Category < ActiveRecord::Base
      attr_accessible :name, :description, :parent, :children, :items, :parent_id

      has_many :children, :class_name => "Category", :foreign_key => "parent_id", :dependent => :nullify
      belongs_to :parent, :class_name => "Category"

      has_many :categorizations
      has_many :items, :through => :categorizations

      def all_children(children_array = [])
        children = Category.where(:parent_id => self.id).includes(:items)

        children_array += children.all
        children.each do |child|      
          children_array = child.all_children(children_array)
        end
        children_array
      end

    end

class Categorization < ActiveRecord::Base
  attr_accessible :category, :item

  belongs_to :category
  belongs_to :item

end

I'm search the category tree recursively for items associated to categories. However, besides filtering categories by parent_id, I want to apply a filter on items name. How can I do this (I was expecting something like Category.where(:parent_id => self.id).includes(:items).where(:name => 'something...'))?

Thanks in advance!