Skip to content

Commit

Permalink
Allow index pages to use query parameter to filter records
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Jan 11, 2012
1 parent cf8354b commit c1ca214
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/base_controller.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def field_group
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
def get_list_of_records(klass, options = {}) def get_list_of_records(klass, options = {})
items = klass.name.tableize items = klass.name.tableize
options[:query] ||= params[:query] if params[:query]
self.current_page = options[:page] if options[:page] self.current_page = options[:page] if options[:page]
query, tags = parse_query_and_tags(options[:query]) if options[:query] query, tags = parse_query_and_tags(options[:query]) if options[:query]
self.current_query = query self.current_query = query
Expand Down

0 comments on commit c1ca214

Please sign in to comment.