Skip to content

Instantly share code, notes, and snippets.

View peterlcullen's full-sized avatar

Peter Cullen peterlcullen

  • Los Angeles, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am peterlcullen on github.
  • I am pcullen (https://keybase.io/pcullen) on keybase.
  • I have a public key ASA3iZ-6zm1BFWPv8u6onY67RIotcnTMLqa3lrA9Gdyquwo

To claim this, I am signing this object:

class CommentsController < ApplicationController
def users_comments
posts = Post.all
comments = posts.map(&:comments).flatten
@user_comments = comments.select do |comment|
comment.author.username == params[:username]
end
end
end