Guest User

Untitled

a guest
Jun 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. def search_terms
  2. %w{identifier description author credit restrictions keywords asset_location}
  3. end
  4.  
  5. def full_text(query)
  6. search = Asset.new_search
  7. search_terms.each do |term|
  8. search.conditions.send("#{term}_contains=", query)
  9. end
  10. search.conditions.any = true
  11. search.all
  12. end
Add Comment
Please, Sign In to add comment