aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/ship.rb
Commit message (Collapse)AuthorAgeFilesLines
* Don't redefine autosave association callbacks in nested attrsSean Griffin2015-01-281-0/+1
| | | | | | | | These callbacks will already have been defined when the association was built. The check against `reflection.autosave` happens at call time, not at define time, so simply modifying the reflection is sufficient. Fixes #18704
* Deprecate `false` as the way to halt AR callbacksclaudiob2015-01-021-1/+1
| | | | | | | | | | Before this commit, returning `false` in an ActiveRecord `before_` callback such as `before_create` would halt the callback chain. After this commit, the behavior is deprecated: will still work until the next release of Rails but will also display a deprecation warning. The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Fixed custom validation context bug where childEric Chahin2014-05-011-0/+6
| | | | | | | | associations were not being saved. Fixes #13854. [Eric Chahin, Aaron Nelson, & Kevin Casey]
* Revert "context in validation goes through has many relationship"Aaron Patterson2014-02-201-8/+0
| | | | This reverts commit 5e3d466d52fa4e9a42c3a1f8773a7c31da875e48.
* context in validation goes through has many relationshipKevin Casey2014-02-081-0/+8
|
* Nested records (re: autosave) are now updated even when the intermediate ↵Ian White2010-05-181-1/+2
| | | | | | parent record is unchanged [#4242 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Rollback the transaction when one of the autosave associations fails to ↵Eloy Duran2010-01-081-0/+6
| | | | save. [#3391 state:resolved]
* Refactored previous changes to nested attributes.Eloy Duran2009-12-281-0/+2
|
* Define autosave association callbacks when using accepts_nested_attributes_for.Eloy Duran2009-11-071-1/+1
| | | | | | | This way we don't define all the validation methods for all associations by default, but only when needed. [#3355 state:resolved]
* Define autosave association validation methods only when needed. [#3161 ↵Alexey Kovyrin2009-09-121-1/+1
| | | | | | state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Changed API of NestedAttributes to take an array, or hash with index keys, ↵Lance Ivy2009-02-131-2/+2
| | | | | | | | 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]
* Add support for nested object forms to ActiveRecord and the helpers in ↵Eloy Duran2009-02-011-0/+7
| | | | | | | | ActionPack Signed-Off-By: Michael Koziarski <michael@koziarski.com> [#1202 state:committed]
* move assets and modelsJeremy Kemper2008-01-181-0/+3
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de