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
-
#_delete ⇒ Object
Deal with deprecated _delete.
-
#_destroy ⇒ Object
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.
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. = {} end |
Instance Method Details
#_delete ⇒ Object
Deal with deprecated _delete.
262 263 264 265 |
# File 'lib/active_record/nested_attributes.rb', line 262 def _delete #:nodoc: ActiveSupport::Deprecation.warn "_delete is deprecated in nested attributes. Use _destroy instead." _destroy end |
#_destroy ⇒ Object
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.
256 257 258 |
# File 'lib/active_record/nested_attributes.rb', line 256 def _destroy marked_for_destruction? end |