Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- has_many:invoices
- belongs_to:campaign'
- Campaign.includes(:invoices).where("compaigns.end_date > ? ",Date.today, :invoices => { :campaign_id => nil } ).count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement