Module: ActiveRecord::NestedAttributes

Defined in:
lib/active_record/nested_attributes.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods Classes: TooManyRecords

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
# File 'lib/active_record/nested_attributes.rb', line 6

def self.included(base)
  base.extend(ClassMethods)
  base.class_inheritable_accessor :nested_attributes_options, :instance_writer => false
  base.nested_attributes_options = {}
end

Instance Method Details

#_destroyObject

Returns ActiveRecord::AutosaveAssociation::marked_for_destruction? It’s used in conjunction with fields_for to build a form element for the destruction of this association.

See ActionView::Helpers::FormHelper::fields_for for more info.



259
260
261
# File 'lib/active_record/nested_attributes.rb', line 259

def _destroy
  marked_for_destruction?
end