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


25
26
27
# File 'lib/evil_query.rb', line 25

def initialize(user)
  @user = user
end

Instance Method Details

#postsObject


29
30
31
# File 'lib/evil_query.rb', line 29

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