Skip to content

Instantly share code, notes, and snippets.

@seivan
Created March 15, 2009 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seivan/79557 to your computer and use it in GitHub Desktop.
Save seivan/79557 to your computer and use it in GitHub Desktop.
class CommentsController < ApplicationController
before_filter :blogpost_find,
:only => [:index, :show, :new, :create, :update, :destroy]
private
def blogpost_find
@blogpost = Blogpost.find(params[:blogpost_id])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment