1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

7 commits

Author SHA1 Message Date
Wolfram Arnold
73f2d37505 Add test to verify that the new :inverse_of association option will indeed fix the validation problem for a belongs_to relationship that validates_presence_of the parent, when both the parent and the child are new (in-memory) records. Also check that this works when the parents adds child via nested_attributes_for.
Lastly, add a require 'models/pet' to association_validation_test.rb, so that test can be run independently (was failing due to that missing dependency). [#2815 status:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-08 13:07:49 +02:00
Jeremy Kemper
e8550ee032 Cherry-pick core extensions 2009-05-13 12:00:15 -07:00
Mike Breen
9010ed2755 Allow you to pass :all_blank to :reject_if option to automatically create a Proc that will reject any record with blank attributes. 2009-05-10 15:02:00 +12:00
Lance Ivy
5dbc9d40a4 Changed API of NestedAttributes to take an array, or hash with index keys, 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]
2009-02-13 21:47:56 +13:00
Pascal Ehlert
455a7633db Nested attribute accessors should ignore new records with truthy _delete key.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1861 state:committed]
2009-02-06 13:36:59 +13:00
Michael Koziarski
fa7aa19a99 Don't rely on the order in these tests 2009-02-01 15:27:41 +13:00
Eloy Duran
ec8f045844 Add support for nested object forms to ActiveRecord and the helpers in ActionPack
Signed-Off-By: Michael Koziarski <michael@koziarski.com>

[#1202 state:committed]
2009-02-01 14:44:30 +13:00