aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/nested_attributes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use primary key in conditions, not 'id' [#4395 state:resolved]Mathieu Arnold2010-05-041-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Some require indifferent_access addedSantiago Pastorino2010-04-211-0/+1
| | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
* Ensure not to load the entire association when bulk updating existing ↵Pratik Naik2010-04-141-2/+12
| | | | records using nested attributes
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+1
|
* cleaning up a bunch of method already defined warnings [#4209 state:resolved]Aaron Patterson2010-03-171-0/+3
| | | | Signed-off-by: wycats <wycats@gmail.com>
* clean up more warnings, remove unnecessary methods, fix eval line numbers. ↵Aaron Patterson2010-03-161-2/+2
| | | | | | [#4193 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Merge docrailsPratik Naik2010-01-171-5/+5
|
* Renamed AssociationReflection #collection_association? to #collection?.Eloy Duran2010-01-081-1/+1
|
* Raise a RecordNotFound if an ID in nested attributes is given but doesn't ↵Eloy Duran2010-01-071-0/+11
| | | | return a record. [#2415 state:resolved]
* Remove deprecated '_delete' option from NestedAttributes.Eloy Duran2010-01-071-13/+2
|
* Removed unnecessary call to #try and cleaned up a bit more.Eloy Duran2010-01-071-6/+4
|
* Cleanup some code in nested_attributes.rb, autosave_association.rb, and ↵Eloy Duran2010-01-071-7/+1
| | | | | | associations.rb with AssociationReflection#collection_association? Also cache the result value.
* Refactored nested attributes a bit around :reject_if => :all_blank.Eloy Duran2010-01-071-5/+4
|
* Refactored previous changes to nested attributes.Eloy Duran2009-12-281-32/+18
|
* Add an :update_only option to accepts_nested_attributes_for for to-one ↵Michael Siebert2009-12-281-3/+23
| | | | | | associations. [#2563 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Make sure to not add autosave callbacks multiple times. [#3575 state:resolved]Eloy Duran2009-12-281-3/+1
| | | | This makes sure that, in a HABTM association, only one join record is craeted.
* Define autosave association callbacks when using accepts_nested_attributes_for.Eloy Duran2009-11-071-0/+2
| | | | | | | This way we don't define all the validation methods for all associations by default, but only when needed. [#3355 state:resolved]
* Add a :limit option to specify the maximum number of records that can be ↵Pratik Naik2009-10-091-1/+14
| | | | processed by accepts_nested_attributes_for
* Store entire options hash in the class var rather than just the reject_if ↵Pratik Naik2009-10-091-12/+15
| | | | proc for the nested attributes
* Use indifferent access attributes instead of stringifying themPratik Naik2009-10-081-2/+2
|
* Allow accepts_nested_attributes_for :reject_if option accept symbols for ↵Pratik Naik2009-10-071-6/+33
| | | | | | | | using a method Conflicts: activerecord/lib/active_record/nested_attributes.rb
* Rename nested attributes _delete to _destroy to reflect its actual behavior ↵José Valim2009-09-121-21/+32
| | | | | | and DSL (:allow_destroy). Deprecation warning added. [#2889 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Raise an exception with friendlier error message when attempting to build a ↵Mike Breen2009-09-121-1/+6
| | | | | | polymorphic belongs_to with accepts_nested_attributes_for. [#2318 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Merge docrailsPratik Naik2009-07-251-1/+1
|
* Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
* Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+3
|
* Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-4/+5
|
* Allow you to pass :all_blank to :reject_if option to automatically create a ↵Mike Breen2009-05-101-1/+10
| | | | Proc that will reject any record with blank attributes.
* Changed API of NestedAttributes to take an array, or hash with index keys, ↵Lance Ivy2009-02-131-100/+146
| | | | | | | | of hashes that have the id on the inside of the attributes hash and updated the FormBuilder to produce such hashes. Also fixed NestedAttributes with composite ids. Signed-off-by: Michael Koziarski <michael@koziarski.com> Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> [#1892 state:committed]
* Nested attribute accessors should ignore new records with truthy _delete key.Pascal Ehlert2009-02-061-2/+6
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1861 state:committed]
* Add support for nested object forms to ActiveRecord and the helpers in ↵Eloy Duran2009-02-011-0/+279
ActionPack Signed-Off-By: Michael Koziarski <michael@koziarski.com> [#1202 state:committed]