Product.with_scope(:conditions => ["id < ?", 10]) do
stime = Time.now.utc.strfime("%Y-%m-%d")
@items = Product.find(:all, :conditions => ["publish = 1 and
(publish_from is null or publish_from <= ?) and (publish_to is null or
publish_to >= ?)", stime, stime])
end
all queries within the block automatically have the defined
conditions, ie, they have been scoped.
take a look at the second link i listed. scan down the page until you
get to the section titled 'around filter'. study the example he has
provided as it sounds exactly like what you are trying to accomplish.