Module: SearchQd::ClassMethods

Defined in:
lib/search_qd.rb

Instance Method Summary collapse

Instance Method Details

#search_qd_columns(*column_names) ⇒ Object

method which can be used inside class definitions to define the default search columns of the class and to extend the class with search_qd singleton method



15
16
17
18
19
20
21
# File 'lib/search_qd.rb', line 15

def search_qd_columns(*column_names)
  @searchable_columns = []
  [column_names].flatten.each do |column_name|
    @searchable_columns << column_name
  end
  extend SearchQd::SingletonMethods
end