Module: AwesomeForm::Methods::Attributes

Included in:
FormBuilder
Defined in:
lib/awesome_form/methods/attributes.rb

Instance Method Summary collapse

Instance Method Details

#discover_attributes(model) ⇒ Object



5
6
7
8
9
10
# File 'lib/awesome_form/methods/attributes.rb', line 5

def discover_attributes(model)
  cols = association_columns(*AwesomeForm.default_associations)
  cols += content_columns
  cols -= AwesomeForm.excluded_columns.flatten.map(&:to_sym)
  cols.compact
end