Skip to content

Instantly share code, notes, and snippets.

@joshuaclayton
Created March 9, 2009 15:34
Show Gist options
  • Select an option

  • Save joshuaclayton/76345 to your computer and use it in GitHub Desktop.

Select an option

Save joshuaclayton/76345 to your computer and use it in GitHub Desktop.
scope = LoggedException
scope = scope.search(params[:query]) unless params[:query].blank?
scope = scope.days_old(params[:date_ranges_filter]) unless params[:date_ranges_filter].blank?
scope = scope.by_exception_class(params[:exception_names_filter]) unless params[:exception_names_filter].blank?
scope = scope.by_controller_and_action(*params[:controller_actions_filter].split('/').collect(&:downcase)) unless params[:controller_actions_filter].blank?
scope = scope.sorted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment