Guest User

Untitled

a guest
Dec 10th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Workable.includes(:job_types)
  2. .where(job_types: {id: nil})
  3.  
  4. workables.includes(:job_types)
  5. .where('job_types.id = ?', params[:job_type])
  6. .references(:job_types)
  7.  
  8. Workable.includes(:job_types).where(job_types: {id: nil})
  9.  
  10. workables.includes(:job_types)
  11. .where(:job_types => {:id => [params[:job_type], nil]})
Add Comment
Please, Sign In to add comment