1. 22 5月, 2012 3 次提交
    • A
      Convert Hash to HashWithIndifferentAccess in ActiveRecord::Store. · 940c1351
      Andrey Voronkov 提交于
      In order to make migration from 3.x apps easier, we should try to
      convert
      Hash instances to HashWithIndifferentAccess, to allow accessing values
      with both symbol and a string. This is follow up to changes in 3c0bf043.
      940c1351
    • G
      Restore the frozen state on rollback. Fixes #6417. · cb847b9f
      Godfrey Chan 提交于
      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.
      cb847b9f
    • C
      Refactor aggregation writer method · d5d9a281
      Carlos Antonio da Silva 提交于
      Only constantize class_name once.
      d5d9a281
  2. 21 5月, 2012 1 次提交
  3. 20 5月, 2012 2 次提交
  4. 19 5月, 2012 17 次提交
  5. 18 5月, 2012 12 次提交
  6. 17 5月, 2012 5 次提交