Module: Formalism::ModelForms::List::ClassMethods

Includes:
Memery
Defined in:
lib/formalism/model_forms/list.rb

Overview

Module for class methods

Instance Method Summary collapse

Instance Method Details

#inherited(list_form) ⇒ Object



31
32
33
34
35
# File 'lib/formalism/model_forms/list.rb', line 31

def inherited(list_form)
	super

	list_form.search_fields(*search_fields)
end

#search_fields(*fields) ⇒ Object



24
25
26
27
28
29
# File 'lib/formalism/model_forms/list.rb', line 24

def search_fields(*fields)
	@search_fields ||= Set.new
	return @search_fields if fields.empty?

	@search_fields.merge(fields)
end