1. 28 11月, 2011 1 次提交
  2. 16 11月, 2011 1 次提交
    • J
      association methods are now generated in modules · 7cba6a37
      Josh Susser 提交于
      Instead of generating association methods directly in the model
      class, they are generated in an anonymous module which
      is then included in the model class. There is one such module
      for each association. The only subtlety is that the
      generated_attributes_methods module (from ActiveModel) must
      be forced to be included before association methods are created
      so that attribute methods will not shadow association methods.
      7cba6a37
  3. 09 7月, 2011 1 次提交
  4. 26 5月, 2011 1 次提交
  5. 24 3月, 2011 1 次提交
    • M
      Make clearing of HABTM join table contents happen in an after_destory callback. · 54c963c8
      Murray Steele 提交于
      The old method of redefining destroy meant that clearing the HABTM join table would happen as long as the call to destroy succeeded.  Which meant if there was a before_destroy that stopped the instance being destroyed using normal means (returning false, raising ActiveRecord::Rollback) rather than exceptional means the join table would be cleared even though the instance wasn't destroyed.  Doing it in an after_destroy hook avoids this and has the advantage of happening inside the DB transaction too.
      54c963c8
  6. 22 2月, 2011 1 次提交