aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/nested_attributes.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-11-031-3/+3
|\ | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md
| * Fixed typo on ActiveRecord nested_attributes.Luis M2012-10-231-3/+3
| |
* | Remove ActiveRecord::ModelJon Leighton2012-10-261-6/+2
| | | | | | | | | | | | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* | Revert "Get rid of the ActiveRecord::Model::DeprecationProxy thing."Jeremy Kemper2012-10-201-1/+1
| | | | | | | | This reverts commit 83846838252397b3781eed165ca301e05db39293.
* | Get rid of the ActiveRecord::Model::DeprecationProxy thing.Jon Leighton2012-10-191-1/+1
|/ | | | | | | | | | | | | | | | | I think it's going to be too much pain to try to transition the :active_record load hook from executing against Base to executing against Model. For example, after Model is included in Base, and modules included in Model will no longer get added to the ancestors of Base. So plugins which wish to be compatible with both Model and Base should use the :active_record_model load hook which executes *before* Base gets loaded. In general, ActiveRecord::Model is an advanced feature at the moment and probably most people will continue to inherit from ActiveRecord::Base for the time being.
* Remove unused private method AR::NestedAttributes#unassignable_keys and ↵Guillermo Iguaran2012-09-191-5/+1
| | | | reference to mass_assignment options
* Remove mass_assignment_options from ActiveRecordGuillermo Iguaran2012-09-161-12/+10
|
* Remove mass assignment security from ActiveRecordGuillermo Iguaran2012-09-161-15/+1
|
* Refactor nested attributes limit logic to lookup :limit option only onceCarlos Antonio da Silva2012-09-081-11/+12
|
* allow to pass Symbol or Proc into :limit option of ↵Mikhail Dieterle2012-08-261-3/+13
| | | | #accepts_nested_attributes_for
* load active_support/core_ext/class/attribute in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* s/scoped/scope/Jon Leighton2012-08-011-1/+1
|
* Made ArgumentError messages consistent.Philip Arndt2012-07-061-2/+2
|
* Simplify AR configuration code.Jon Leighton2012-06-151-1/+5
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* better wordingHrvoje Šimić2012-05-111-4/+4
|
* Nested attribute setters can be overridden.Jonathan Mukai & Peter Jaros2012-03-281-1/+1
| | | | Overriding implementation can call super.
* Modified comments explaining what the update_only option does.Mark2012-02-281-8/+19
|
* Array.wrap is an overhead as there is already check for classSergey Nartimov2012-01-061-1/+1
|
* Support configuration on ActiveRecord::Model.Jon Leighton2011-12-281-1/+1
| | | | | | | | | | | | | | | The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present.
* 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
|