Module: Reform::Form::EmptyAttributesOptions

Included in:
Setup::Representer, Sync::InputRepresenter
Defined in:
lib/reform/form/virtual_attributes.rb

Overview

TODO: this should be in Representer namespace.

Instance Method Summary collapse

Instance Method Details

#optionsObject



5
6
7
8
9
10
11
# File 'lib/reform/form/virtual_attributes.rb', line 5

def options
  empty_fields = representable_attrs.
    find_all { |d| d.options[:empty] }.
    collect  { |d| d.name.to_sym }

  super.exclude!(empty_fields)
end