Skip to content

Instantly share code, notes, and snippets.

@lin
Created March 3, 2015 22:24
Show Gist options
  • Select an option

  • Save lin/db683f19f340478cc4e2 to your computer and use it in GitHub Desktop.

Select an option

Save lin/db683f19f340478cc4e2 to your computer and use it in GitHub Desktop.
Product.where(:title => Regexp.new( ".*" + params[:term].to_s + ".*", true ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment