aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/nested_attributes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Exclude _destroy parameter in :all_blank check (issue #2937)Aaron Christy2011-10-171-2/+3
|
* no need to sort the valuesAaron Patterson2011-07-201-1/+1
|
* assign_nested_attributes_for_collection_association should work with Ruby ↵Franck Verrot2011-07-201-1/+1
| | | | | | 1.9 [Closes #2106] Children attributes can be either String's or Symbol's, so let's check if the object responds to to_i.
* Use an instance variable to store the current masss assignment optionsAndrew White2011-07-041-4/+4
|
* Pass mass-assignment options to nested models - closes #1673.Andrew White2011-06-131-13/+19
|
* Remove dead branch code that appeared back in a merge.José Valim2011-04-101-6/+0
|
* Destroying records via nested attributes works independent of reject_if:Durran Jordan2011-04-051-0/+1
| | | | | | | | | | - When a :_destroy truthiness is provided in the attributes hash, the record should get destroyed regardless of the result of the proc or method supplied to :reject_if. (If :allow_destroy is true) [#6006 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-181-5/+5
|\ | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association.rb activerecord/lib/active_record/fixtures.rb
| * Split AssociationProxy into an Association class (and subclasses) which ↵Jon Leighton2011-02-181-5/+5
| | | | | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
* | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-151-1/+13
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/examples/performance.rb activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/nested_attributes.rb activerecord/test/cases/relations_test.rb
| * Rename add_record_to_target_with_callbacks to add_to_targetJon Leighton2011-02-141-1/+1
| |
| * ActiveRecord::Relation#primary_key should return a string, just like ↵Jon Leighton2011-01-031-1/+1
| | | | | | | | ActiveRecord::Base.primary_key does.
| * Let AssociationCollection#find use #scoped to do its finding. Note that I am ↵Jon Leighton2011-01-031-1/+1
| | | | | | | | removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences.
| * When a has_many association is not :uniq, appending the same record multiple ↵Jon Leighton2010-12-231-1/+12
| | | | | | | | times should append it to the @target multiple times [#5964 state:resolved]
* | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2010-12-201-13/+13
|\| | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/persistence.rb
| * If a nested_attribute is being marked for destruction and at the same time ↵Neeraj Singh2010-11-241-5/+2
| | | | | | | | | | | | | | | | an attr_accessor value is being assigned then the value being assigned is being ignored. This patch is a fix for that issue. [#5939 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Remove unneeded local var.Emilio Tagua2010-11-241-2/+1
| |
| * Remove uneeded local var definition.Emilio Tagua2010-11-241-2/+1
| |
| * class inheritable attributes is used no more! all internal use of class ↵Josh Kalderimis2010-11-201-4/+9
| | | | | | | | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com>
* | Bring back "Reject attributes even if association is loaded" after rebasing ↵Emilio Tagua2010-11-191-3/+10
| | | | | | | | to master.
* | Reeject attributes even if association is loadedMarcin Raczkowski2010-11-191-1/+0
|/
* present? is better hereSantiago Pastorino2010-11-111-1/+1
|
* Use ! instead of notSantiago Pastorino2010-11-111-1/+1
|
* Fixed bug in active_record/nested_attributes where an empty string id caused ↵Santiago Pastorino2010-11-111-1/+1
| | | | | | | | an ActiveRecord::RecordNotFound error. Found by [Ben Tillman] [#5638 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Revert 0c0b0aa0f223523331afdc157fb3992a121bf497 which introduced a security ↵Michael Koziarski2010-10-151-9/+8
| | | | | | | | | | vulnerability. This addresses CVE-2010-3933 Conflicts: activerecord/lib/active_record/nested_attributes.rb
* Fix for nested_attributes with has_many association fails when a single ↵Neeraj Singh2010-09-271-1/+6
| | | | | | | | record is being updated. [#5705 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* reject_id option should be respected while using nested_attributesNeeraj Singh2010-09-241-3/+3
| | | | | | [#5579 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* switch present in favor of emptyAaron Patterson2010-09-221-1/+1
|
* Note about validates_presence_of and nested attributesTrevor Turk2010-08-191-0/+16
|
* Note about using attr_accessible with nested attributesTrevor Turk2010-08-191-0/+12
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* edit pass to apply API guideline wrt the use of "# =>" in example codeXavier Noria2010-07-301-2/+2
|
* accepts_nested_attributes_for typoAdam Meehan2010-06-291-1/+1
|
* Fixes #2415 by creating a new instance of the Model when saving attributes ↵George Montana Harkin2010-06-271-8/+11
| | | | | | to that model and the associated attributes already exist. Tests included. [#2415 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Missing quote and indentation wrongMalcolm Locke2010-06-171-2/+2
|
* Adds title and minor changes.Rizwan Reza2010-06-161-1/+2
|
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-1/+1
|
* 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
|