Module: Netzke::Grid::Components

Extended by:
ActiveSupport::Concern
Included in:
Base, Tree::Base
Defined in:
lib/netzke/grid/components.rb

Overview

Child components for Grid and Tree

Instance Method Summary collapse

Instance Method Details

#configure_form(c) ⇒ Object



43
44
45
46
47
48
49
50
51
52
# File 'lib/netzke/grid/components.rb', line 43

def configure_form(c)
  shared_config = %w(mode persistent_config strong_values).reduce({}) do |r, m|
    r.merge!(m.to_sym => config.send(m))
  end

  c.model = model
  c.merge!(shared_config)
  c.attribute_overrides = attribute_overrides
  c.items = form_items
end

#configure_form_window(c) ⇒ Object



37
38
39
40
41
# File 'lib/netzke/grid/components.rb', line 37

def configure_form_window(c)
  c.klass = Basepack::RecordFormWindow
  c.form_config = ActiveSupport::OrderedOptions.new
  configure_form(c.form_config)
end