1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Godfrey Chan cb847b9f2e Restore the frozen state on rollback. Fixes #6417.
Currently, when saving a frozen record, an exception would be thrown
which causes a rollback. However, there is a bug in active record that
"defrost" the record as a side effect:

    >> t = Topic.new
    => #<Topic id: nil, ...>
    >> t.freeze
    => #<Topic id: nil, ...>
    >> t.save
    RuntimeError: can't modify a frozen Hash
    >> t.frozen?
    => false
    >> t.save
    => true

This patch fixes the bug by explictly restoring the frozen state on the
attributes Hash after every rollback.
2012-05-21 14:57:04 -07:00
..
active_record/connection_adapters
assets
cases Restore the frozen state on rollback. Fixes #6417. 2012-05-21 14:57:04 -07:00
fixtures Tests for removing a HABTM association when optimistic locking is enabled. 2012-03-07 23:56:23 -05:00
migrations
models Refactor aggregation writer method 2012-05-21 18:34:58 -03:00
schema Merge pull request #6238 from pwnall/pgsql_bytea_limit 2012-05-17 10:56:39 -07:00
support Remove IdentityMap 2012-03-13 20:08:54 -03:00
.gitignore
config.example.yml
config.rb