Skip to content

Instantly share code, notes, and snippets.

@scottmagdalein
Created July 6, 2012 23:59
Show Gist options
  • Save scottmagdalein/3063470 to your computer and use it in GitHub Desktop.
Save scottmagdalein/3063470 to your computer and use it in GitHub Desktop.
applicants_controller#show
def show
@applicant = Applicant.find(params[:id])
@comments = @applicant.comments.includes(:user)
@comment = @applicant.comments.new
@like = @applicant.likes.new
respond_to do |format|
format.html # show.html.erb
format.json { render json: @applicant }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment