aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/autosave_association.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | Remove associated records from identity map if any raised an unexpected ↵Emilio Tagua2010-11-191-14/+19
| | | | | | | | exception.
* | Looping prevention for autosave relations on validation and creationMarcin Raczkowski2010-11-191-3/+20
|/
* use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-091-7/+7
| | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Refactoring: replace the mix of variables like @finder_sql, @counter_sql, ↵Jon Leighton2010-10-301-2/+2
| | | | etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly.
* has_one maintains the association with separate after_create/after_updateXavier Noria2010-10-221-1/+10
| | | | | This way parent models can get their own after_create and after_update callbacks fired after has_one has done its job.
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-5/+5
| | | | 's/[ \t]*$//' -i {} \;)
* Removing most of the symbol to proc usage in Active RecordPrem Sichanugrist2010-08-131-1/+1
| | | | This will hopefully make Active Record run a bit more faster.
* be more precise re :validate and :autosaveXavier Noria2010-08-121-2/+1
|
* revises some autosave docs, style and contentXavier Noria2010-08-121-57/+22
|
* applied guidelines to "# =>"Paco Guzman2010-08-121-5/+5
|
* adding more documentation for autosave optionNeeraj Singh2010-08-091-13/+37
|
* adding the missing closing tagNeeraj Singh2010-07-311-1/+1
|
* fixing documentation just a little bitNeeraj Singh2010-07-311-20/+14
|
* Removing unnecessary code [#5192 state:resolved]Thiago Pradi2010-07-261-4/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "save on parent should not cascade to child unless child changed ↵José Valim2010-07-211-3/+1
| | | | | | | | [#3353 state:open]" Please check Lighthouse for more information. This reverts commit 4a0d7c1a439c6ad8d35bf514761824e51fa07df2.
* save on parent should not cascade to child unless child changed [#3353 ↵Subba Rao Pasupuleti2010-07-181-1/+3
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add module_eval missing file_name and line_number args [#4712 state:resolved]Evgeniy Dolzhenko2010-06-261-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Adds title and basic description where needed.Rizwan Reza2010-06-151-0/+2
|
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-1/+1
|
* Make the logic for nested_records_changed_for_autosave? simpler.José Valim2010-06-071-9/+5
| | | | [#4648 state:resolved]
* Fixing test class names and refactor line in autosave associationCarlos Antonio da Silva2010-06-071-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Nested records (re: autosave) are now updated even when the intermediate ↵Ian White2010-05-181-1/+22
| | | | | | parent record is unchanged [#4242 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* eliminate alias_method_chain from ActiveRecordwycats2010-05-091-4/+2
|
* save(false) is gone, use save(:validate => false) instead.José Valim2010-01-171-5/+5
|
* Different nested validations should not be ignore [#3638 status:resolved]José Valim2010-01-141-1/+2
|
* Renamed AssociationReflection #collection_association? to #collection?.Eloy Duran2010-01-081-1/+1
|
* Rollback the transaction when one of the autosave associations fails to ↵Eloy Duran2010-01-081-4/+10
| | | | save. [#3391 state:resolved]
* Exclude unchanged records from the collection being considered for autosave. ↵Lawrence Pit2010-01-081-3/+3
| | | | | | [#2578 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Moved the validation logic to the association reflection and refactored ↵Eloy Duran2010-01-071-23/+16
| | | | autosave_association.rb a bit.
* Don't use strings for callbacks, as these will be evaled. Rather use ↵Eloy Duran2010-01-071-2/+2
| | | | | | symbols, which uses a direct method dispatch. Patch by Comron Sattari. [#3429 state:resolved]
* Cleanup some code in nested_attributes.rb, autosave_association.rb, and ↵Eloy Duran2010-01-071-2/+1
| | | | | | associations.rb with AssociationReflection#collection_association? Also cache the result value.
* Make nested attributes behave like in 2.3.5 and add a sanity test for it ↵José Valim2010-01-021-1/+1
| | | | with I18n.
* Make sure to not add autosave callbacks multiple times. [#3575 state:resolved]Eloy Duran2009-12-281-14/+26
| | | | This makes sure that, in a HABTM association, only one join record is craeted.
* Add new finder methods to association collection.Pratik Naik2009-12-271-2/+2
|
* Removed some superfluous conditionals from the autosave association ↵Eloy Duran2009-09-121-5/+3
| | | | | | validation methods. Which are unneeded now that we only define them when needed.
* Define autosave association validation methods only when needed. [#3161 ↵Alexey Kovyrin2009-09-121-3/+10
| | | | | | state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* During autosave, ignore records that already have been destroyed. [#2537 ↵Eloy Duran2009-09-121-2/+4
| | | | state:resolved]
* Fix has_one with foreign_key and primary_key association bug which caused ↵Graeme Porteous2009-09-121-3/+6
| | | | | | | | the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Fix autosave association to skip validation if it is marked for destruction. ↵Dmitry Polushkin2009-09-121-7/+5
| | | | | | [#2064 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Explicitely setting `autosave => false' should override new_record ↵Eloy Duran2009-09-121-3/+3
| | | | | | autosaving. [#2214 state:resolved] Original author is Jacob.
* Don't cascade autosave validation to destroyed children. [#2761 state:resolved]Lance Ivy2009-09-121-0/+2
| | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Add primary_key option to belongs_to associationSzymon Nowak2009-07-151-1/+2
| | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge branch 'master' into active_modelJoshua Peek2009-05-291-12/+15
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: activemodel/lib/active_model/core.rb activemodel/test/cases/state_machine/event_test.rb activemodel/test/cases/state_machine/state_transition_test.rb activerecord/lib/active_record/validations.rb activerecord/test/cases/validations/i18n_validation_test.rb activeresource/lib/active_resource.rb activeresource/test/abstract_unit.rb
| * 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.
| * Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-7/+6
| |
| * Ensure the parent record is always saved when the child is invalid. [#2249 ↵Eloy Duran2009-04-271-5/+9
| | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Move all the Active Record validations to Active ModelPratik Naik2009-03-191-1/+1
|/
* Ensure AutosaveAssociation runs remove callbacks [#2146 state:resolved]Luca Guidi2009-03-121-1/+1
| | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed autosave checks on objects with hm:t in :include [#2213 state:resolved]Will Bryant2009-03-121-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Don't validate records of an :autosave association if they're marked for ↵Eloy Duran2009-02-271-4/+7
| | | | | | destruction. [#2064 status:resolved] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>