… object. This commit contains a simple failing test that demonstrates the behaviour we expect, and a fix. When using `becomes` to transform the type of an object, it should retain any error information that was present on the original instance.
This reverts commit ee2be43.
If we don't have a primary key when we ask for it, it's better to fail fast. Fixes GH #2307.
Previously we would just silently write the attribute. This can lead to subtle bugs (for example, see the change in AutosaveAssociation where a through association would wrongly gain an attribute. Also, ensuring that we never gain any new attributes after initialization will allow me to reduce our dependence on method_missing.
…itor for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
… Fixes issue #402.
Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb
…d. fixes #796
…d security guide
This reverts commit 45c233e. Signed-off-by: Santiago Pastorino <email@example.com>
Signed-off-by: Santiago Pastorino <firstname.lastname@example.org>
Conflicts: activerecord/examples/performance.rb activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb 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/nested_attributes.rb activerecord/test/cases/relations_test.rb
…timistic locking [#5505 state:resolved] Signed-off-by: Santiago Pastorino and José Ignacio Costa <email@example.com>
Signed-off-by: Santiago Pastorino and José Ignacio Costa <firstname.lastname@example.org>
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