- class ApplicationController < ActionController::Base
- before_filter :fetch_authors_and_categories
- #...
- private
- def fetch_authors_and_categories
- Couch.client(:bucket => 'system').pipelined do
- @authors = Author.popular
- @categories = Category.popular
- end
- end
- #...
- end