Skip to content

Instantly share code, notes, and snippets.

@kirkbushell
Created August 29, 2011 23:35
Show Gist options
  • Save kirkbushell/1179708 to your computer and use it in GitHub Desktop.
Save kirkbushell/1179708 to your computer and use it in GitHub Desktop.
conditions = {}
conditions.merge({:first_name.matches => '%'+@search_value+'%'} | {:last_name.matches => '%'+@search_value+'%'}) unless @search_value.blank?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment