Module: ActiveScaffold::Bridges::Ancestry::AncestryBridge

Defined in:
lib/active_scaffold/bridges/ancestry/ancestry_bridge.rb

Instance Method Summary collapse

Instance Method Details

#initialize(model_id) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/active_scaffold/bridges/ancestry/ancestry_bridge.rb', line 4

def initialize(model_id)
  super(model_id)

  return unless model.respond_to? :ancestry_column

  columns << :parent_id
  columns[:parent_id].form_ui = :ancestry
  update.columns.exclude :ancestry
  create.columns.exclude :ancestry, :parent_id
  list.columns.exclude :ancestry, :parent_id
end