Skip to content

Instantly share code, notes, and snippets.

@kirkbushell
Created August 29, 2011 02:36
Show Gist options
  • Save kirkbushell/1177650 to your computer and use it in GitHub Desktop.
Save kirkbushell/1177650 to your computer and use it in GitHub Desktop.
conditions = {}
conditions[:title.matches] = '%'+@search_value+'%'
conditions[:description.matches] = '%'+@search_value+'%'
conditions[:status] = params[:show] if params[:show] != 'all'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment