title: Rails sql complex query for public_activity
body: <p>I'm using the public_activity gem with rails 4 to generate an activity feed. The models are as follows:</p>
  
  <pre><code>Class Post 
    has_many :comments
    has_many :taggings
    has_many :tags, through: :taggings 
  
  Class Comment 
    belongs_to :post
  
  Class Tagging
    belongs_to :post
    belongs_to :tag
  
  Class Tag
    has_many :posts, through: :taggings
    has_many :taggings
  </code></pre>
  
  <p>On the Tags#show action, I'd like to show a feed of all activities of posts and comments belonging to posts belonging to that particular tag. How do I write the query?</p>
  
  <pre><code>class TagsController
  
      activities = PublicActivity::Activity.order("created_at desc").where('trackable_type =? OR trackable_type = ?', 'Post', 'Comment')
      @activities =.....
  </code></pre>