Sha256: 8e7c3e1f3ec24e642e4f996da3a720ad7b1a412a00dcc731d67af2fc5af4cfa2
Contents?: true
Size: 939 Bytes
Versions: 56
Compression:
Stored size: 939 Bytes
Contents
# The LiveSearchGridPanel provides a search field in the toolbar of # the GridPanel. While the content of the search field is changeing, # the data in the grid gets reloaded and the filter string is given to # a scope on the configured model. The scope name by default is # :live_search but it can be reconfigured by the configuration option # :live_search_scope. NOTE: this is rewrite of the Netzke community # pack component of the same name. We should submit this to the # community. # # Options: # * +live_search_scope+ - The scope name for filtering the results by # the live search (default: :live_search) # class Marty::LiveSearchGridPanel < Marty::McflyGridPanel client_class do |c| c.include :live_search_grid_panel end def get_records(params) search_scope = config[:live_search_scope] || :live_search model.send(search_scope, params && params[:live_search] || '').scoping do super end end end
Version data entries
56 entries across 56 versions & 1 rubygems