public
Clone URL: git://github.com/defunkt/barefootexamples.git
barefootexamples / 03controller.rb
100644 12 lines (10 sloc) 0.229 kb
1
2
3
4
5
6
7
8
9
10
11
12
class PostController < ApplicationController
  helper_method :current_posts, :top_posts
 
private
  def current_posts
    @current_posts ||= Post.find(:all)
  end
  
  def top_posts
    @top_posts ||= Post.find_top_posts
  end
end