Browse files

Allow index pages to use query parameter to filter records

  • Loading branch information...
1 parent cf8354b commit c1ca21499ea0390dbeb22eb3922ba3ef0cb46c92 @ndbroadbent committed Jan 11, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 app/controllers/base_controller.rb
View
1 app/controllers/base_controller.rb
@@ -109,6 +109,7 @@ def field_group
#----------------------------------------------------------------------------
def get_list_of_records(klass, options = {})
items = klass.name.tableize
+ options[:query] ||= params[:query] if params[:query]
self.current_page = options[:page] if options[:page]
query, tags = parse_query_and_tags(options[:query]) if options[:query]
self.current_query = query

0 comments on commit c1ca214

Please sign in to comment.