Guest User

Untitled

a guest
Feb 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. def conditions_for_doohickies
  2. unless params[:search].blank?
  3. tags = params[:search].split(/\s*,\s*/)
  4. conditions << ['tags.name IN (?)', tags]
  5. end
  6. conditions
  7. end
Add Comment
Please, Sign In to add comment