Class: EvilQuery::LikedPosts

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) ⇒ LikedPosts

Returns a new instance of LikedPosts.


34
35
36
# File 'lib/evil_query.rb', line 34

def initialize(user)
  @user = user
end

Instance Method Details

#postsObject


38
39
40
# File 'lib/evil_query.rb', line 38

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