Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created August 21, 2010 16:53
Show Gist options
  • 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