2 3 4
# File 'app/controllers/posts_controller.rb', line 2 def index @posts = Post.all end
6 7 8
# File 'app/controllers/posts_controller.rb', line 6 def show @post = Post.find(params[:id]) end