aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/pirate.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecated support for passing hashes and relations to default_scope, in ↵Jon Leighton2011-04-121-1/+1
| | | | favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
* We shouldn't be using scoped.scoping { ... } to build associated records, as ↵Jon Leighton2011-01-301-0/+2
| | | | this can affect validations/callbacks/etc inside the record itself [#6252 state:resolved]
* has_one should always remove the old record (properly), even if not saving ↵Jon Leighton2011-01-111-0/+4
| | | | the new record, so we don't get the database into a pickle
* use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-091-1/+1
| | | | | | | | | | | - 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>
* Don't overwrite unsaved updates when loading an association but preserve the ↵James Le Cuirot2010-06-201-2/+2
| | | | | | | | order of the loaded records. Reapplied from before but now allows already-saved records to be refreshed. [#4830 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "Don't overwrite unsaved updates when loading an association but ↵José Valim2010-06-111-2/+2
| | | | | | | | preserve the order of the loaded records. [#4642 state:open]" This commit introduced a regression described in ticket [#4830]. This reverts commit 0265c708b9696c3943518ad5f3dabdc22c5eba11.
* Don't overwrite unsaved updates when loading an association but preserve the ↵James Le Cuirot2010-06-091-2/+2
| | | | | | order of the loaded records. [#4642 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@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]
* Allow accepts_nested_attributes_for :reject_if option accept symbols for ↵Pratik Naik2009-10-071-0/+4
| | | | | | | | using a method Conflicts: activerecord/lib/active_record/nested_attributes.rb
* Define autosave association validation methods only when needed. [#3161 ↵Alexey Kovyrin2009-09-121-3/+6
| | | | | | state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Allow you to pass :all_blank to :reject_if option to automatically create a ↵Mike Breen2009-05-101-0/+2
| | | | Proc that will reject any record with blank attributes.
* Ensure AutosaveAssociation runs remove callbacks [#2146 state:resolved]Luca Guidi2009-03-121-1/+48
| | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Changed API of NestedAttributes to take an array, or hash with index keys, ↵Lance Ivy2009-02-131-1/+1
| | | | | | | | 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]
* Dirty attributes aren't cleared if save fails. [#174 state:resolved]Xavier Noria2008-05-121-0/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix has_many :through a polymorphic has_many. Closes #10529 [Aleksey ↵Jeremy Kemper2008-02-021-1/+3
| | | | | | Kondratenko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* move assets and modelsJeremy Kemper2008-01-181-0/+5
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de