class Chapter < ActiveRecord::Base
  has_many :recipes

  def self.find_fried_recipe_titles
    Chapter.find(:all, :include => :recipes).map do |c| 
      c.recipes.map do |r|
        r if r.title =~ /fried/i
      end
    end.flatten.compact.collect {|r| r.title}
  end
en