Guest User

Untitled

a guest
Oct 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. class ApplicationController < ActionController::Base
  2.  
  3. before_filter :fetch_authors_and_categories
  4.  
  5. #...
  6.  
  7. private
  8.  
  9. def fetch_authors_and_categories
  10. Couch.client(:bucket => 'system').pipelined do
  11. @authors = Author.popular
  12. @categories = Category.popular
  13. end
  14. end
  15.  
  16. #...
  17.  
  18. end
Add Comment
Please, Sign In to add comment