rails/activerecord/test
Chris Thompson ebd7cc6f45 Fix #8856 Ensure has_one association=(associate) triggers save.
activerecord/lib/active_record/associations.rb states:

    # [association=(associate)]
    #   Assigns the associate object, extracts the primary key, sets it as the foreign key,
    #   and saves the associate object.

Since commit 42dd5d9f2976677a4bf22347f2dde1a8135dfbb4 to fix #7191, this
is no longer the case if the associate has changed, but is the same
object. For example:

    # Pirate has_one :ship
    pirate = Pirate.create!(catchphrase: "A Pirate")
    ship = pirate.build_ship(name: 'old name')
    ship.save!

    ship.name = 'new name'
    pirate.ship = ship

That last line should trigger a save. Although we are not changing the
association, the associate (ship) has changed.
2013-04-30 16:14:16 -07:00
..
active_record/connection_adapters Ensure disconnecting or reconnecting resets the transaction state 2012-09-15 00:03:04 +01:00
assets Added test to illustrate bad binary blobs. 2012-01-31 13:45:00 -06:00
cases Fix #8856 Ensure has_one association=(associate) triggers save. 2013-04-30 16:14:16 -07:00
fixtures has_many through obeys order on through association 2013-04-04 15:45:13 -04:00
migrations Preserve magic comments and content encoding of copied migrations. 2013-03-09 15:38:02 +09:00
models Fix scope chaining + STI 2013-04-05 13:14:28 +01:00
schema Correctly parse bigint defaults in PostgreSQL 2013-04-05 09:37:08 -04:00
support Revert "Fix annoy warning, when executing testcase." 2012-11-30 12:07:55 +04:00
.gitignore
config.example.yml Simulated & actual (manual/skipped) PostgreSQL auto-reconnection tests. 2012-07-16 09:55:20 -07:00
config.rb