Class: EvilQuery::CommentedPosts

Inherits:
Base
  • Object
show all
Defined in:
lib/evil_query.rb

Instance Method Summary collapse

Methods inherited from Base

#fetch_ids!, #id_sql

Constructor Details

#initialize(user) ⇒ CommentedPosts

Returns a new instance of CommentedPosts.


44
45
46
# File 'lib/evil_query.rb', line 44

def initialize(user)
  @user = user
end

Instance Method Details

#postsObject


48
49
50
# File 'lib/evil_query.rb', line 48

def posts
  Post.commented_by(@user.person)
end