Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created August 21, 2010 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bryanl/542558 to your computer and use it in GitHub Desktop.
Save bryanl/542558 to your computer and use it in GitHub Desktop.
class CommentsController < ApplicationController
# we are nested
before_filter :load_topic
def index
@comments = @topic.comments.not_shitty
end
private
def load_topic
@topic = Topic.find(params[:topic_id])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment