Class: AutoSelect2::Select2SearchAdapter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/auto_select2/select2_search_adapter/base.rb

Direct Known Subclasses

Default

Class Method Summary collapse

Class Method Details

.limitObject

Amount rows per ajax-request



6
7
8
# File 'lib/auto_select2/select2_search_adapter/base.rb', line 6

def limit
  25 # TODO: move to settings/config
end

.search_from_autocomplete(term, page, search_method, options) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/auto_select2/select2_search_adapter/base.rb', line 10

def search_from_autocomplete(term, page, search_method, options)
  if search_method.nil?
    search_default(term, page, options)
  else
    self.public_send("search_#{search_method}", term, page, options)
  end
end