Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | | Refactor the implementations of AssociatioCollection#delete and #destroy to ↵ | Jon Leighton | 2011-02-07 | 1 | -1/+1 | |
| | | | | | | | | | | | | be more consistent with each other, and to stop passing blocks around, thus making the execution easier to follow. | |||||
| * | | Make record.association.destroy(*records) on habtm and hm:t only delete ↵ | Jon Leighton | 2011-02-07 | 1 | -72/+169 | |
| |/ | | | | | | | records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry. | |||||
| * | In a number of places in the tests, we only need to turn off transactional ↵ | Jon Leighton | 2011-01-11 | 1 | -10/+10 | |
| | | | | | | | | fixtures when the DB does not support savepoints. This speeds the test run up by about 8-9% on my computer, when running rake test_sqlite3_mem :) | |||||
| * | When assigning a has_one, if the new record fails to save, raise an error | Jon Leighton | 2011-01-11 | 1 | -2/+2 | |
| | | ||||||
| * | Allow assignment on has_one :through where the owner is a new record [#5137 ↵ | Jon Leighton | 2011-01-03 | 1 | -0/+7 | |
| | | | | | | | | | | | | | | | | | | | | state:resolved] This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct. Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things. Phew, long commit message! | |||||
* | | Merge remote branch 'rails/master' into identity_map | Emilio Tagua | 2010-12-20 | 1 | -4/+15 | |
|\| | | | | | | | | | | | | | | | 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 | |||||
| * | Only call save on belongs_to associations if the record has changed or any ↵ | Chiel Wester | 2010-12-16 | 1 | -0/+11 | |
| | | | | | | | | | | | | nested associations have changed (resolves #3353) Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
| * | converting clone test to dup test | Aaron Patterson | 2010-11-23 | 1 | -4/+4 | |
| | | ||||||
* | | Call super setup in this test. | Emilio Tagua | 2010-11-19 | 1 | -1/+2 | |
| | | ||||||
* | | Revert "IdentityMap - Adjustments to test cases" | Emilio Tagua | 2010-11-19 | 1 | -6/+1 | |
| | | | | | | | | | | | | | | | | This reverts commit 4db9dca55e3acc2c59f252eb83ecb83db5f4b81b. Conflicts: activerecord/test/cases/identity_map_test.rb | |||||
* | | IdentityMap - Adjustments to test cases | Marcin Raczkowski | 2010-11-19 | 1 | -1/+6 | |
|/ | ||||||
* | removing many unused variables | Aaron Patterson | 2010-11-16 | 1 | -4/+2 | |
| | ||||||
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -43/+43 | |
| | | | | | | | | | | | - 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> | |||||
* | has_one maintains the association with separate after_create/after_update | Xavier Noria | 2010-10-22 | 1 | -0/+20 | |
| | | | | | This way parent models can get their own after_create and after_update callbacks fired after has_one has done its job. | |||||
* | get rid of the warning "+ after local variable is interpreted as binary ↵ | Xavier Noria | 2010-08-19 | 1 | -13/+13 | |
| | | | | operator even though it seems like unary operator" in Ruby 1.9.2 | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 | |
| | | | | 's/[ \t]*$//' -i {} \;) | |||||
* | missing requires added | Santiago Pastorino | 2010-07-26 | 1 | -0/+2 | |
| | ||||||
* | Removing unnecessary code [#5192 state:resolved] | Thiago Pradi | 2010-07-26 | 1 | -1/+7 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Revert "save on parent should not cascade to child unless child changed ↵ | José Valim | 2010-07-21 | 1 | -18/+0 | |
| | | | | | | | | [#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 Pasupuleti | 2010-07-18 | 1 | -0/+18 | |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Fix bug with rolling back frozen attributes. | Brian Durand | 2010-06-18 | 1 | -1/+0 | |
| | | | | | | [#2991] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | Fixing test class names and refactor line in autosave association | Carlos Antonio da Silva | 2010-06-07 | 1 | -4/+4 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Use better assertion methods for testing | Neeraj Singh | 2010-05-19 | 1 | -4/+4 | |
| | | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Make use of assert_equal to test equallity between object assert expects and ↵ | Santiago Pastorino | 2010-05-16 | 1 | -2/+2 | |
| | | | | | | | | object and a message of error [#4611 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Drop AR I18n deprecation and simple use errors.messages as fallback. | José Valim | 2010-01-30 | 1 | -2/+2 | |
| | ||||||
* | save(false) is gone, use save(:validate => false) instead. | José Valim | 2010-01-17 | 1 | -6/+6 | |
| | ||||||
* | Different nested validations should not be ignore [#3638 status:resolved] | José Valim | 2010-01-14 | 1 | -0/+8 | |
| | ||||||
* | Rollback the transaction when one of the autosave associations fails to ↵ | Eloy Duran | 2010-01-08 | 1 | -1/+44 | |
| | | | | save. [#3391 state:resolved] | |||||
* | Exclude unchanged records from the collection being considered for autosave. ↵ | Lawrence Pit | 2010-01-08 | 1 | -9/+4 | |
| | | | | | | [#2578 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | |||||
* | Add failing test that triggers the stack overflow | Bryan Stearns | 2010-01-08 | 1 | -0/+9 | |
| | ||||||
* | Errors messages are now moved from :activerecord.errors to simply :errors on ↵ | José Valim | 2010-01-07 | 1 | -5/+3 | |
| | | | | I18n yml files. | |||||
* | Be sure to convert namespaced names to we have 'Parrots name' instead of ↵ | José Valim | 2010-01-02 | 1 | -0/+1 | |
| | | | | 'Parrots.name' in error messages. | |||||
* | Make nested attributes behave like in 2.3.5 and add a sanity test for it ↵ | José Valim | 2010-01-02 | 1 | -7/+23 | |
| | | | | with I18n. | |||||
* | Make sure to not add autosave callbacks multiple times. [#3575 state:resolved] | Eloy Duran | 2009-12-28 | 1 | -0/+29 | |
| | | | | This makes sure that, in a HABTM association, only one join record is craeted. | |||||
* | Define autosave association validation methods only when needed. [#3161 ↵ | Alexey Kovyrin | 2009-09-12 | 1 | -0/+115 | |
| | | | | | | state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | |||||
* | During autosave, ignore records that already have been destroyed. [#2537 ↵ | Eloy Duran | 2009-09-12 | 1 | -0/+24 | |
| | | | | state:resolved] | |||||
* | Fix autosave association to skip validation if it is marked for destruction. ↵ | Dmitry Polushkin | 2009-09-12 | 1 | -1/+6 | |
| | | | | | | [#2064 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | |||||
* | Explicitely setting `autosave => false' should override new_record ↵ | Eloy Duran | 2009-09-12 | 1 | -0/+64 | |
| | | | | | | autosaving. [#2214 state:resolved] Original author is Jacob. | |||||
* | Don't cascade autosave validation to destroyed children. [#2761 state:resolved] | Lance Ivy | 2009-09-12 | 1 | -0/+11 | |
| | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | |||||
* | Oracle saves empty string as NULL | Raimonds Simanovskis | 2009-08-06 | 1 | -10/+36 | |
| | ||||||
* | Merge branch 'master' into active_model | Joshua Peek | 2009-05-29 | 1 | -1/+28 | |
|\ | | | | | | | | | | | | | | | | | | | | | 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 | |||||
| * | Add missing models and fixtures [#2673 state:resolved] | Emilio Tagua | 2009-05-19 | 1 | -1/+6 | |
| | | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
| * | Ensure the parent record is always saved when the child is invalid. [#2249 ↵ | Eloy Duran | 2009-04-27 | 1 | -0/+22 | |
| | | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | | Deprecate Error#on(attribute) in favour of Errors#[attribute] | Pratik Naik | 2009-03-20 | 1 | -16/+16 | |
| | | ||||||
* | | Move all the Active Record validations to Active Model | Pratik Naik | 2009-03-19 | 1 | -2/+2 | |
|/ | ||||||
* | Ensure AutosaveAssociation runs remove callbacks [#2146 state:resolved] | Luca Guidi | 2009-03-12 | 1 | -0/+35 | |
| | | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Don't validate records of an :autosave association if they're marked for ↵ | Eloy Duran | 2009-02-27 | 1 | -3/+27 | |
| | | | | | | destruction. [#2064 status:resolved] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com> | |||||
* | Fixed that autosave should validate associations even if master is invalid ↵ | David Heinemeier Hansson | 2009-02-27 | 1 | -8/+442 | |
| | | | | [#1930 status:committed] | |||||
* | Also save :autosave enabled associations when #save! is used. | Eloy Duran | 2009-02-06 | 1 | -1/+23 | |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1877 state:committed] | |||||
* | Add support for nested object forms to ActiveRecord and the helpers in ↵ | Eloy Duran | 2009-02-01 | 1 | -0/+386 | |
ActionPack Signed-Off-By: Michael Koziarski <michael@koziarski.com> [#1202 state:committed] |