Association is
class Campaign
  has_many :views_logs
  has_many :users, through: :views_logs
end
I want to get all users in a Campaign within any specific dates etc
meaning, I want to do something like:
 Campaign.first.users.where(?) 
Now, when I query:
Campaign.first.users.all
I get list of all users within a certain campaign, but how I can I get only those users which have Campaign between specific date ranges only.
 
     
     
     
    